Template:Swatch
Kaonekelo
{{{1}}}
This template generates a color swatch box floating to the right margin.
Parameters
[kulemba source]- The color code in any notation supported by CSS.
- Height of the swatch box, defaults to 100 pixels.
- Width of the swatch box, defaults to 162 pixels.
- or title: The caption of the color box, defaults to the color code.
Examples
[kulemba source]{{Swatch|Blue}}
[kulemba source] Blue
{{Swatch|#FFFF00}}
[kulemba source] #FFFF00
{{Swatch|rgb(20%, 40%, 60%)}}
[kulemba source] rgb(20%, 40%, 60%)
{{Swatch|rgba(20%, 40%, 60%, 80%)}}
[kulemba source] rgba(20%, 40%, 60%, 80%)
{{Swatch|rgb(20% 40% 60% / 80%)}}
[kulemba source] rgb(20% 40% 60% / 80%)
{{Swatch|hsl(210deg, 40%, 60%)}}
[kulemba source] hsl(210deg, 40%, 60%)
{{Swatch|hsl(3.66rad 40% 60%)}}
[kulemba source] hsl(3.66rad 40% 60%)
{{Swatch|hsl(0.6turn 40% 60%)}}
[kulemba source] hsl(0.6turn 40% 60%)
{{Swatch|hwb(210deg 40% 60%)}}
[kulemba source] hwb(210deg 40% 60%)
{{Swatch|Lab(20% 0.4 0.6)}}
[kulemba source] Lab(20% 0.4 0.6)
{{Swatch|Lch(40% 0.6 210deg)}}
[kulemba source] Lab(50% 0.8 210deg)
See also
[kulemba source]- {{color sample}} – small colored box:
- {{swatch inline}} – mostly for use on talk pages when discussing color: red
- {{color swatch}} – similar to {{swatch}} but with multiple parameters
- {{coltit}} – colored table header cell