getHalo: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Updated with recent version changes.) |
No edit summary |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getHalo() | getHalo() | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getHalo( | getHalo(tokenRef) | ||
</ | </syntaxhighlight> | ||
'''Parameter''' | '''Parameter''' | ||
{{param| | {{param|tokenRef|getHalo which has its halo color returned, defaults to the [[Current Token]]. {{TrustedParameter}} }} | ||
{{Note|Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.}} | |||
|example= | |example= | ||
The following example will display the text "Halo Color Text" in the color of the [[Token | The following example will display the text "Halo Color Text" in the color of the [[Current Token]]'s [[Halo]]. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
<span style="color:[r: getHalo()]">Halo Color Text</span> | <span style="color:[r: getHalo()]">Halo Color Text</span> | ||
</ | </syntaxhighlight> | ||
|also= | |||
[[Halo]], | |||
[[setHalo|setHalo()]] | |||
|changes= | |changes= |
Latest revision as of 23:59, 13 May 2024
getHalo() Function
• Introduced in version 1.3b49
Gets the color value of a token's Halo. The value returned is a string that represents the hexadecimal value of the color of the Halo in the format
"#RRGGBB"
or "None"
if the token has no Halo.Usage
getHalo()
getHalo(tokenRef)
Parameter
tokenRef
- getHalo which has its halo color returned, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.
Example
The following example will display the text "Halo Color Text" in the color of the Current Token's Halo.
<span style="color:[r: getHalo()]">Halo Color Text</span>
See Also
Version Changes
- 1.3b51 - Added
id
parameter option.