Template:Ink chip: Difference between revisions
Robertbaxter (talk | contribs) No edit summary |
Robertbaxter (talk | contribs) No edit summary |
||
Line 36: | Line 36: | ||
}} | }} | ||
{{#rmatch: | {{#rmatch:{{#invoke:Color|hexToHsv| | ||
{{#invoke:Color|hexToHsv| | |||
{{#invoke:Color|rgbTripletToHex| | {{#invoke:Color|rgbTripletToHex| | ||
{{#rmatch:145,78,114|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$1|}} | {{#rmatch:145,78,114|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$1|}} | ||
Line 43: | Line 42: | ||
| {{#rmatch:145,78,114|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$3|}} | | {{#rmatch:145,78,114|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$3|}} | ||
}} | }} | ||
}} | }}|/[0-9]{1,3}%$/|$1}} | ||
|/[0-9]{1,3}%$/|$1}} | |||
</noinclude> | </noinclude> |
Revision as of 19:46, 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}}
Test Area
145 78 114
914E72
328°, 46%, 57%