token.halo: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Token.halo to token.halo: Converting page titles to lowercase)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:


===Getting the Token Halo Color===
===Getting the Token Halo Color===
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
Halo color: [token.halo]
Halo color: [token.halo]
</source>
</syntaxhighlight>


Outputs the hexadecimal value for the token halo color. In the case of the example image above, it would output ''#ffff00''.  
Outputs the hexadecimal value for the token halo color. In the case of the example image above, it would output ''#ffff00''.  


===Setting the Token Halo Color===
===Setting the Token Halo Color===
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h:token.halo = "red"]
[h:token.halo = "red"]
</source>
</syntaxhighlight>


or
or


<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h:token.halo = #ff0000]
[h:token.halo = #ff0000]
</source>
</syntaxhighlight>


Sets the color of the token.halo to red (or the hexadecimal value ''#ff0000'').
Sets the color of the token.halo to red (or the hexadecimal value ''#ff0000'').
Line 27: Line 27:
===Removing the Token Halo===
===Removing the Token Halo===


<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h:token.halo="None"]
[h:token.halo="None"]
</source>
</syntaxhighlight>


===Color Names and Standard Colors===
===Color Names and Standard Colors===
Line 49: Line 49:
The variable will also accept any hexadecimal color value. Hexadecimal color values do not need to be enclosed in quotes.
The variable will also accept any hexadecimal color value. Hexadecimal color values do not need to be enclosed in quotes.
[[Category:Special Variable]]
[[Category:Special Variable]]
[[Category:Macro Function]]

Latest revision as of 23:59, 4 July 2023

The variable token.halo allows programmatic querying and setting of the token's Halo, a colored border that, if set, appears around the token. In the image below, the yellow border around the token is the token's halo.

Examples

Getting the Token Halo Color

Halo color: [token.halo]

Outputs the hexadecimal value for the token halo color. In the case of the example image above, it would output #ffff00.

Setting the Token Halo Color

[h:token.halo = "red"]

or

[h:token.halo = #ff0000]

Sets the color of the token.halo to red (or the hexadecimal value #ff0000).

Removing the Token Halo

[h:token.halo="None"]

Color Names and Standard Colors

The token.halo variable accepts the following named colors (if using a named color, enclose the value in quotes):

  • Black
  • Green
  • Yellow
  • Orange
  • Red
  • Blue
  • Cyan
  • DarkGray
  • Magenta
  • Pink
  • White

The variable will also accept any hexadecimal color value. Hexadecimal color values do not need to be enclosed in quotes.