Template:Wiki color: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 65: Line 65:
}
}
</templatedata>
</templatedata>
{{DISPLAYNAME:wiki color}}</noinclude><includeonly><!--
{{DISPLAYTITLE:wiki color}}</noinclude><includeonly><!--
-->{{#switch:{{lc:{{{1}}}}}
-->{{#switch:{{lc:{{{1}}}}}
  | sunflower = rgba(255, 181, 17, {{{2|100}}})
  | sunflower = rgba(255, 181, 17, {{{2|100}}})

Revision as of 17:35, 11 September 2025

This template generates a rgba() format color code (for use in style CSS attributes) based on named ink colors. The color palette of this wiki is based on riso ink colors for Sunflower Blue Light Teal Red Kelly Green Orchid Light Gray—this template provides a quick way to embed those color codes.

Color R G B
Sunflower 255 181 17
Blue 0 120 191
Light Teal 0 157 165
Red 255 102 94
Kelly Green 103 179 70
Orchid 187 118 207
Light Gray 184 194 204

These are static values, not semantic queries, to reduce the queries needed for basic site functionality.

Usage

The ink name should be provided as the first parameter. An optional second parameter provides the alpha/lightness value for the color, and should be used only as 10 or 20 (or the default of 100).

{{wiki color|Sunflower}}
{{wiki color|Light Teal}}
{{wiki color|Orchid|20}}

rgba(255, 181, 17, 100)

rgba(0, 157, 165, 100)

rgba(187, 118, 207, 20)

TemplateData

A CSS color code from key ink colors used in styles throughout the site.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Color name1

The ink color name.

Suggested values
sunflower blue light teal red kelly green orchid light gray
Stringrequired
Alpha2

Percentage alpha (0–100), to produce lighter versions of each color

Suggested values
10 20
Numberoptional