Template:Color block/doc

From MOASSpedia
< Template:Color block
Revision as of 11:56, 27 February 2021 by Wikipedia>WOSlinker (add {{Documentation subpage}} template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Color block template

This template can be used to display a color block and its associated CSS color name / HEX value.

Using a CSS color keyword

Example:

{{Color block|red}}

Output:

Using a CSS HEX color value

Note: A HEX color value must be prefixed by the "#" character.

Example:

{{Color block|#FF00FF}}

Output:

Using a custom name

You may specify a custom color name to be displayed, instead of the CSS keyword or HEX value.

Example:

{{Color block|#ffbf00|Amber}}

Output: Amber

Color tooltip

If you have specified a custom color, then you can use color-tooltip=1 to show a tooltip for the CSS color name / HEX color value. If you are accessing Wikipedia through a PC, then you can hover the mouse to see this tooltip.

Example:

{{Color block|#ffbf00|Amber|color-tooltip=1}}

Output: Amber

Bold type

You may use the bold=1 parameter to show the text in bold type.


Example:

{{Color block|green|bold=1}}

Output:


Example:

{{Color block|#0000ff|bold=1}}

Output:


Example:

{{Color block|#ffbf00|Amber|bold=1}}

Output: Amber


Example:

{{Color block|#ffbf00|Amber|bold=1|color-tooltip=1}}

Output: Amber

External links