Template:Color sample
Jump to navigation
Jump to search
<span style="display:inline-block;width:1em;height:1em;border:1.62px solid black;background:{{{1}}};" title="Script error: No such module "string2".">
Usage
{{Color sample|red}}
→ <span style="display:inline-block;width:1em;height:1em;border:1.62px solid black;background:red;" title="Script error: No such module "string2".">{{Color sample|#00FF00}}
→ <span style="display:inline-block;width:1em;height:1em;border:1.62px solid black;background:#00FF00;" title="Script error: No such module "string2".">{{Color sample|#00FF00|description=green}}
→ <span style="display:inline-block;width:1em;height:1em;border:1.62px solid black;background:#00FF00;" title="Script error: No such module "string2".">
Adds a description of the color for screen reader users{{Color sample|{{Independent (politician)/meta/color}}}}
→ <span style="display:inline-block;width:1em;height:1em;border:1.62px solid black;background:Template:Independent (politician)/meta/color;" title="Script error: No such module "string2".">
(Instead of specifying a color directly, this example uses{{Independent (politician)/meta/color}}
, which generates#DDDDDD
.)
Note: When hovered over, the template shows the value used for color as a tooltip by default. This is also heard by a screen reader. An optional parameter, |description=
can be used to change that to something more user-friendly, as shown in the third example.