Template:Ink chip: Difference between revisions
Robertbaxter (talk | contribs) No edit summary |
Robertbaxter (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
<pre> | <pre> | ||
{{Color chip|Violet | {{Color chip|Violet}} | ||
</pre> | </pre> | ||
{{Color chip|Violet | {{Color chip|Violet}} | ||
=== Advanced attributes === | === Advanced attributes === | ||
Sometimes you will need the chip to | Sometimes you will need the chip label to be different from the full ink name, you can use that buy adding the ''label'' attribute: | ||
<pre> | <pre> | ||
{{Color chip| | {{Color chip|Fluorescent Orange|label=Fluo. Orange}} | ||
</pre> | </pre> | ||
{{Color chip| | {{Color chip|Fluorescent Orange|label=Fluo. Orange}} | ||
=== Advanced attributes === | === Advanced attributes === | ||
Line 24: | Line 24: | ||
{{Color chip|Huckleberry}} | {{Color chip|Huckleberry}} | ||
</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);">[[ | </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 16:31, 10 December 2024
A template to display ink colors as chips.
Usage
{{Color chip|Violet}}
Advanced attributes
Sometimes you will need the chip label to be different from the full ink name, you can use that buy adding the label attribute:
{{Color chip|Fluorescent Orange|label=Fluo. Orange}}
Advanced attributes
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.
{{Color chip|Huckleberry}}