Template:Ink chip: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 15: Line 15:
</pre>
</pre>
{{Color chip|Yellow|link=Violet}}  
{{Color chip|Yellow|link=Violet}}  
</noinclude>


=== Test Area ===
{{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$1|}}
{{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$2|}}
{{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$3|}}


{{#invoke:Color|hexToHsv|
{{#invoke:Color|rgbTripletToHex|
{{#invoke:Color|rgbTripletToHex|
   {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$1|}}
   {{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$1|}}
| {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$2|}}
| {{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$2|}}
| {{#rrmatch:{{#show: {{{1}}} |? Has rgb#}}|/[0-9]+/|$3|}}
| {{#rrmatch:{{#show: 145,78,114|/[0-9]+/|$3|}}
}}
}}
}}
</noinclude>


<includeonly><span class="chip color-chip text-{{#switch:{{lc:{{{1}}}}}
<includeonly><span class="chip color-chip text-{{#switch:{{lc:{{{1}}}}}

Revision as of 19:39, 3 December 2024

A template to display ink colors as chips.

Usage

{{Color chip|Violet}}

Template:Color chip

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}}

Template:Color chip

Test Area

{{#rrmatch: {{#rrmatch: {{#rrmatch:

{{#invoke:Color|rgbTripletToHex|

 {{#rrmatch:

| {{#rrmatch: | {{#rrmatch: }}