Template:Ink card: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 11: Line 11:


===Advanced===
===Advanced===
You can also use this template to pull in full categories of inks, such as all [[:Category:Riso Inks|Riso Inks]]:
You can also use this template to pull in full categories of inks, such as all Standard-series [[:Category:Riso inks|Riso inks]]:
<pre>
<pre>
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]]
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]]
  [[Has series::Standard]]
   |format=plainlist
   |format=plainlist
   |headers=hide
   |headers=hide
Line 21: Line 22:
</pre>
</pre>
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]]
{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]]
  [[Has series::Standard]]
   |format=plainlist
   |format=plainlist
   |headers=hide
   |headers=hide
Line 27: Line 29:
}}|Ink card|,|}}
}}|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; margin-bottom:.25rem;">
<includeonly><div class="ink-card-wrapper" style="position:relative; margin-bottom: 1rem; background: #f8f9fa;border-radius:.75rem; overflow: hidden;border: 1px solid #F1F3F5;">
  <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="color-ramp text-{{#ifexpr:{{#invoke:Color|csvrgbToLum|{{#show: {{{1}}} |? Has rgb#}}}}>75|black|white}}" style="background-color:rgba({{#show: {{{1}}} |? Has rgb#}},1);border-color:rgba({{#show: {{{1}}} |? Has rgb#}},1); display: flex; flex-direction:row; width:100%;box-sizing: border-box;">
     <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>
     <div class="p100" style="width:55%;display: inline-flex; align-items:center; justify-content: flex-start; padding: 1rem;"><span class="title" style="font-size: 1.25rem; line-height: 1.25rem;">[[{{{1}}}]]</span></div>
<span>100%</span></div>
     <div class="p75" style="width:15%; background-color: rgba(250,250,250,.25);display: inline-flex; align-items:center; justify-content: flex-end; padding: 1rem"><span style="font-size: .75rem; line-height: .75rem;">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:center; justify-content: flex-end; padding: 1rem;"><span style="font-size: .75rem; line-height: .75rem;">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:center; justify-content: flex-end; padding: 1rem;"><span style="font-size: .75rem; line-height: .75rem;">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>{{#if:{{#show:{{{1}}}|?Has hex#}}{{#show:{{{1}}}|?Has rgb#}}{{#show:{{{1}}}|?Has cmyk#}}|<div class="color-metadata" style="color: #8a8a8a; padding:.875rem 1rem; display: flex; gap:1rem; font-size:.75rem; border-top: 1px solid #F1F3F5;">{{#if:{{#show:{{{1}}}|?Has hex#}}|<span><strong>HEX:</strong> <code style="white-space: nowrap;"><nowiki>#</nowiki>{{uc:{{#show:{{{1}}}|?Has hex#}}}}</code></span>}}{{#if:{{#show:{{{1}}}|?Has rgb#}}|<span><strong>RGB:</strong> <code style="white-space: nowrap;">({{#rreplace:{{#show:{{{1}}}|?Has rgb#}}|,|, }})</code></span>}}{{#if:{{#show:{{{1}}}|?Has cmyk#}}|<span><strong>CMYK:</strong> <code style="white-space: nowrap;">({{#rreplace:{{#show:{{{1}}}|?Has cmyk#}}|,|, }})</code></span>}}</div>}}</div>
   </div>
</div>
</includeonly>
</includeonly>

Latest revision as of 15:38, 11 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 Standard-series Riso inks:

{{#arraymaptemplate:{{#ask:[[Category:Riso_inks]]
  [[Has series::Standard]]
  |format=plainlist
  |headers=hide
  |link=none
  |limit=100
}}|Ink card|,|}}
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%
75%
50%
25%