Template:Color
Usage[edit]
Basic[edit]
{{color|Text goes here|green}}
- Text goes here
{{color|Text goes here|#112233}}
- Text goes here
{{color|Text goes here|#11223344}}
- Text goes here
Advanced[edit]
{{color|Text goes here|rgb(210,80,255)}}
- Text goes here
{{color|Text goes here|rgba(210,80,255,0.5)}}
- Text goes here
{{color|Text goes here|hsl(159,93%,61%)}}
- Text goes here
{{color|Text goes here|hsla(159,93%,61%,0.5)}}
- Text goes here
{{color|Text goes here|hwb(159 93% 61%)}}
- Text goes here
{{color|Text goes here|hwb(159 93% 61% / 0.5)}}
- Text goes here
{{color|Text goes here|lab(61% 92 -41)}}
(EXPERIMENTAL) (Only works in Safari)
- Text goes here
{{color|Text goes here|lab(61% 92 -41 / 0.5)}}
(EXPERIMENTAL) (Only works in Safari)
- Text goes here
{{color|Text goes here|lch(46% 62 250)}}
(EXPERIMENTAL) (Only works in Safari)
- Text goes here
{{color|Text goes here|lch(46% 62 250 / 0.5)}}
(EXPERIMENTAL) (Only works in Safari)
- Text goes here
The lab and lch parameters will be implemented in Chrome 109, which will be released at the end of December 2022, as well as Edge 109 and Opera 95, which will both be released on January 2023. Before this, Safari is the only browser to support lab and lch parameters.
About[edit]
Changes the color of some text from the default black. The first parameter is the text and the second is the color. You can use a color name or a hexadecimal, but if it's hex be sure to include a #
before the alphanumeric sequence.
Supported parameters[edit]
- Color name
- Hex - #RRGGBB or #RGB
- Hex with alpha - #RRGGBBAA
- RGB - rgb(red, green, blue)
- RGB with alpha - rgba(red, green, blue, alpha)
- HSL - hsl(hue, saturation, luminosity)
- HSL with alpha - hsla(hue, saturation, luminosity, alpha)
- HWB - hwb(hue whiteness blackness)
- HWB with alpha - hwb(hue whiteness blackness / alpha)
- LAB - lab(luminosity red/green blue/yellow) (EXPERIMENTAL) (Only works in Safari)
- LAB with alpha - lab(luminosity red/green blue/yellow / alpha) (EXPERIMENTAL) (Only works in Safari)
- LCH - lch(luminosity chroma hue) (EXPERIMENTAL) (Only works in Safari)
- LCH with alpha - lch(luminosity chroma hue / alpha) (EXPERIMENTAL) (Only works in Safari)