Template:Ink card: Difference between revisions
IssuePress (talk | contribs) No edit summary |
IssuePress (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
==Usage== | ==Usage== | ||
===Simple=== | |||
<pre> | <pre> | ||
{{Ink card|Burgundy}} | {{Ink card|Burgundy}} | ||
Line 8: | Line 10: | ||
{{Ink card|Burgundy}} | {{Ink card|Burgundy}} | ||
{{#ask: | ===Advanced=== | ||
[[Category:Riso_inks]] | You can also use this template to pull in full categories of inks, such as all [[:Category:Riso Inks|Riso Inks]]: | ||
| | <pre> | ||
| | {{#arraymaptemplate:{{#ask:[[Category:Riso_inks]] | ||
| | |format=plainlist | ||
}} | |headers=hide | ||
|link=none | |||
|limit=100 | |||
}}|Ink card|,|}} | |||
</pre> | |||
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]] | |||
|format=plainlist | |||
|headers=hide | |||
|link=none | |||
|limit=100 | |||
}}|Ink card|,|}} | |||
</noinclude> | </noinclude> | ||
<includeonly><div class="ink-card-wrapper text-{{#ifexpr:{{#rmatch:{{#invoke:Color|hexToCielch|{{#invoke:Color|rgbTripletToHex|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$1|}}|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$2|}}|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$3|}}}}}}|/^([0-9]{1,3})/|$1}}>75|black|white}}" style="position:relative;"> | <includeonly><div class="ink-card-wrapper text-{{#ifexpr:{{#rmatch:{{#invoke:Color|hexToCielch|{{#invoke:Color|rgbTripletToHex|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$1|}}|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$2|}}|{{#rmatch:{{#show: {{{1}}} |? Has rgb#}}|/^([0-9]{1,3}),([0-9]{1,3}),([0-9]{1,3})$/|$3|}}}}}}|/^([0-9]{1,3})/|$1}}>75|black|white}}" style="position:relative; margin-bottom:.5rem;"> | ||
<div class="color-ramp" style="color: white; background-color:rgba({{#show: {{{1}}} |? Has rgb#}},1);border-color:rgba({{#show: {{{1}}} |? Has rgb#}},1); display: flex; flex-direction:row; width:100; height: 50px; border-radius:.5rem; overflow: hidden;"> | <div class="color-ramp" style="color: white; background-color:rgba({{#show: {{{1}}} |? Has rgb#}},1);border-color:rgba({{#show: {{{1}}} |? Has rgb#}},1); display: flex; flex-direction:row; width:100; height: 50px; border-radius:.5rem; overflow: hidden;"> | ||
<div class="p100" style="width:55%;display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>100%</span></div> | <div class="p100" style="width:55%;display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>100%</span></div> |
Revision as of 15:20, 10 December 2024
A template for displaying inks as simple color ramps.
Usage
Simple
{{Ink card|Burgundy}}
Advanced
You can also use this template to pull in full categories of inks, such as all Riso Inks:
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]] |format=plainlist |headers=hide |link=none |limit=100 }}|Ink card|,|}}