Difference between revisions of "Template:CSScolor"
Jump to navigation
Jump to search
imported>Crissov m (space) |
imported>Crissov () |
||
Line 140: | Line 140: | ||
|whitesmoke|white-smoke|white smoke=<nowiki>#F5F5F5</nowiki> | |whitesmoke|white-smoke|white smoke=<nowiki>#F5F5F5</nowiki> | ||
|yellow=<nowiki>#FFFF00</nowiki> | |yellow=<nowiki>#FFFF00</nowiki> | ||
− | |yellowgreen|yellow-green|yellow green=<nowiki>#9ACD32</nowiki>|#default={{#ifeq:{{str left|{{{1 | + | |yellowgreen|yellow-green|yellow green=<nowiki>#9ACD32</nowiki> |
+ | |#default={{#ifeq: {{str left|{{{1}}}|1}}| #|/* */{{{1}}}|{{#switch:{{lc:{{str left|{{{1|rgb}}}|3}}}} | ||
+ | |rgb|hsl|hwb|lab|lch={{{1}}} | ||
+ | |#default=/* */{{number sign}}{{{1}}}}}}}}}</onlyinclude> | ||
{{Documentation}} | {{Documentation}} |
Latest revision as of 17:15, 29 February 2020
{{{1}}}
Usage
This template sanitizes and partially converts color codes and color names into a format supported by CSS. This may be useful, in particular, with hexadecimal tuples which may come with or without an initial hash sign #
, because it may be interpreted as the start of an enumerated list in wikicode.
The above documentation is transcluded from Template:CSScolor/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |