Template:Ink card: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 28: Line 28:
</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; margin-bottom:.5rem;">
<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="background-color:rgba({{#show: {{{1}}} |? Has rgb#}},1);border-color:rgba({{#show: {{{1}}} |? Has rgb#}},1); display: flex; flex-direction:row; width:100; height: 45px; 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: space-between; padding: .25rem .5rem .25rem .75rem;"><span class="title" style="font-size: 1.5rem;">[[{{{1}}}]]</span>
<span>100%</span></div>
     <div class="p75" style="width:15%; background-color: rgba(250,250,250,.25);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>75%</span></div>
     <div class="p75" style="width:15%; background-color: rgba(250,250,250,.25);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>75%</span></div>
     <div class="p50" style="width:15%; background-color: rgba(250,250,250,.5);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>50%</span></div>
     <div class="p50" style="width:15%; background-color: rgba(250,250,250,.5);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>50%</span></div>
     <div class="p25" style="width:15%;background-color: rgba(250,250,250,.75);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>25%</span></div>
     <div class="p25" style="width:15%;background-color: rgba(250,250,250,.75);display: inline-flex; align-items:flex-end; justify-content: flex-end; padding: .25rem .5rem;"><span>25%</span></div>
   </div>
   </div>
  <div class="title" style="position: absolute; top:2px; left:.75rem; font-size: 1.5rem;">[[{{{1}}}]]</div>
</div>
</div>
</includeonly>
</includeonly>

Revision as of 15:27, 10 December 2024

A template for displaying inks as simple color ramps.

Usage

Simple

{{Ink card|Burgundy}}
75%
50%
25%


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|,|}}
Apricot 100%
75%
50%
25%
Aqua 100%
75%
50%
25%
Bisque 100%
75%
50%
25%
Black 100%
75%
50%
25%
Blue 100%
75%
50%
25%
Brick 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Brown 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Citron 100%
75%
50%
25%
75%
50%
25%
Copper 100%
75%
50%
25%
Coral 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Crimson 100%
75%
50%
25%
75%
50%
25%
Emerald 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Forest 100%
75%
50%
25%
Granite 100%
75%
50%
25%
Grape 100%
75%
50%
25%
Grass 100%
75%
50%
25%
Gray 100%
75%
50%
25%
Green 100%
75%
50%
25%
75%
50%
25%
Indigo 100%
75%
50%
25%
Ivy 100%
75%
50%
25%
75%
50%
25%
Lagoon 100%
75%
50%
25%
Lake 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Maroon 100%
75%
50%
25%
75%
50%
25%
Melon 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Mint 100%
75%
50%
25%
Mist 100%
75%
50%
25%
Moss 100%
75%
50%
25%
Orange 100%
75%
50%
25%
Orchid 100%
75%
50%
25%
Paprika 100%
75%
50%
25%
Pine 100%
75%
50%
25%
Plum 100%
75%
50%
25%
Pumpkin 100%
75%
50%
25%
Purple 100%
75%
50%
25%
Raisin 100%
75%
50%
25%
75%
50%
25%
Red 100%
75%
50%
25%
75%
50%
25%
Scarlet 100%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
Slate 100%
75%
50%
25%
75%
50%
25%
Spruce 100%
75%
50%
25%
Steel 100%
75%
50%
25%
75%
50%
25%
Teal 100%
75%
50%
25%
Tomato 100%
75%
50%
25%
75%
50%
25%
Violet 100%
75%
50%
25%
White 100%
75%
50%
25%
Wine 100%
75%
50%
25%
Yellow 100%
75%
50%
25%