Difference between revisions of "Template:CSScolor"

From blackwiki
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| <nowiki>#</nowiki>}}}}}| <nowiki>#</nowiki>|{{{1}}}|{{#switch:{{lc:{{str left|{{{1|rgb}}}|3}}}}|rgb|hsl|hwb|lab|lch={{{1}}}|#default= {{number sign}}{{{1}}}}}}}}}</onlyinclude>
+
|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}}}

Template documentation[view] [edit] [history] [purge]

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.