Template:Ink chip: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 6: Line 6:
<pre>
<pre>
{{Ink chip|Violet}}
{{Ink chip|Violet}}
</pre>{{Ink chip|Violet}}
</pre><div>{{Ink chip|Violet}}</div>


===Advanced attributes===
===Advanced attributes===
Line 12: Line 12:
<pre>
<pre>
{{Ink chip|Fluorescent Orange|label=Fluo. Orange}}
{{Ink chip|Fluorescent Orange|label=Fluo. Orange}}
</pre>{{Ink chip|Fluorescent Orange|label=Fluo. Orange}}
</pre><div>{{Ink chip|Fluorescent Orange|label=Fluo. Orange}}</div>


===Missing pages===
===Missing pages===
Line 20: Line 20:
{{Ink chip|Huckleberry}}
{{Ink chip|Huckleberry}}
</pre>
</pre>
{{Ink chip|Huckleberry}}
<div>{{Ink chip|Huckleberry}}</div>


</noinclude><includeonly>{{#ifexist:{{{1}}}|<span class="chip color-chip text-{{#ifexpr:{{#invoke:Color|csvrgbToLum|{{#show:{{{1}}}|?Has rgb#}}}}>75|black|white}}" style="background:rgba({{#show:{{{1}}}|?Has rgb#}},1);border-color:rgba({{#show:{{{1}}}|?Has rgb#}},1);">[[{{{1|}}}|{{{label|{{{1|}}}}}}]]</span>|<span class="chip color-chip">[[{{{1|}}}|{{{label|{{{1|}}}}}}]]</span>}}</includeonly>
</noinclude><includeonly>{{#ifexist:{{{1}}}|<span class="chip color-chip text-{{#ifexpr:{{#invoke:Color|csvrgbToLum|{{#show:{{{1}}}|?Has rgb#}}}}>75|black|white}}" style="background:rgba({{#show:{{{1}}}|?Has rgb#}},1);border-color:rgba({{#show:{{{1}}}|?Has rgb#}},1);">[[{{{1|}}}|{{{label|{{{1|}}}}}}]]</span>|<span class="chip color-chip">[[{{{1|}}}|{{{label|{{{1|}}}}}}]]</span>}}</includeonly>

Revision as of 14:59, 11 December 2024

A template to display ink colors as chips.

Usage

{{Ink chip|Violet}}

Advanced attributes

Sometimes you will need the chip label to be different from the full ink name, you can use that by adding the Template:Code attribute:

{{Ink chip|Fluorescent Orange|label=Fluo. Orange}}

Missing pages

If a chip is requested for a page that does not exist, it will be shown as a chip but with no color background and a red link.

{{Ink chip|Huckleberry}}