Template:Ink chip: Difference between revisions
| IssuePress (talk | contribs) No edit summary | Robertbaxter (talk | contribs)  No edit summary | ||
| Line 16: | Line 16: | ||
| {{Color chip|Yellow|link=Violet}}   | {{Color chip|Yellow|link=Violet}}   | ||
| </noinclude> | </noinclude> | ||
| {{#invoke:Color|hexToHsv| | |||
| {{#invoke:Color|rgbTripletToHex| | |||
|   {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$1|}} | |||
| | {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$2|}} | |||
| | {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$3|}} | |||
| }} | |||
| }} | |||
| <includeonly><span class="chip color-chip text-{{#switch:{{lc:{{{1}}}}} | <includeonly><span class="chip color-chip text-{{#switch:{{lc:{{{1}}}}} | ||
| | mint = black | | mint = black | ||
Revision as of 19:37, 3 December 2024
A template to display ink colors as chips.
Usage
{{Color chip|Violet}}
Advanced attributes
Sometimes you will need the chip to point to a link other than the title, you can use that buy adding the link attribute:
{{Color chip|Yellow|link=Violet}}
Lua error in Module:Color at line 24: Invalid hexadecimal color .