Template:ColorSwatch: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Created page with "{{#invoke:ColorSwatch|swatch|{{{1}}}|bg={{{bg}}}|fg={{{fg}}}|}}")
 
(Add documentation)
 
Line 1: Line 1:
{{#invoke:ColorSwatch|swatch|{{{1}}}|bg={{{bg}}}|fg={{{fg}}}|}}
<noinclude>
ColorSwatch is a template to aid visualizing color combinations in ZZT. For example:
 
<nowiki>The player's color is {{ColorSwatch|fg=white|bg=dark blue}}.</nowiki>
 
Will be rendered as: The player's color is {{ColorSwatch|fg=white|bg=dark blue}}.
 
It supports blinking and non-blinking colors, too:
 
<nowiki>Water is normally {{ColorSwatch|fg=blue|bg=gray|blinking}}, but if you have blinking off, it appears as {{ColorSwatch|fg=blue|bg=white}}.</nowiki>
 
Water is normally {{ColorSwatch|fg=blue|bg=gray|blinking}}, but if you have blinking off, it appears as {{ColorSwatch|fg=blue|bg=white}}.
 
</noinclude><includeonly>{{#invoke:ColorSwatch|swatch|{{{1}}}|bg={{{bg}}}|fg={{{fg}}}|}}</includeonly>

Latest revision as of 09:32, 14 January 2021

ColorSwatch is a template to aid visualizing color combinations in ZZT. For example:

The player's color is {{ColorSwatch|fg=white|bg=dark blue}}.

Will be rendered as: The player's color is white on dark blue (0x1F).

It supports blinking and non-blinking colors, too:

Water is normally {{ColorSwatch|fg=blue|bg=gray|blinking}}, but if you have blinking off, it appears as {{ColorSwatch|fg=blue|bg=white}}.

Water is normally blinking blue on light gray (0xF9), but if you have blinking off, it appears as blue on white (0xF9).