Template:Ink chip: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
A template to display ink colors as chips.  
A template to display ink colors as [https://m3.material.io/components/chips/overview chips].  
 
== Usage ==


'''Example'''<br>
<pre>
<pre>
<nowiki>{{Color chip|Violet}}</nowiki>
{{Color chip|Violet}}
</pre>
</pre>
'''Output'''<br>
{{Color chip|Violet}}  
{{Color chip|Violet}}  
=== Advanced attributes ===
Some chips, such as yellow, will require black text. You can add the additional attribute `text=black` to change the overalying text color to Black.
<pre>
{{Color chip|Yellow|text=black}}
</pre>
{{Color chip|Yellow|text=black}}
</noinclude>
</noinclude>
<includeonly><span class="color-chip" style="
<includeonly><span class="color-chip" style="
font-size:.75rem;  
font-size:1rem;  
line-height: 1rem;
line-height: 1rem;
display:inline-block;  
display:inline-block;  
border-radius: .25rem;  
border-radius: .5rem;  
padding:.25rem .75rem;  
padding:.5rem 1rem;  
font-weight: 600;
font-weight: 500;
letter-spacing: 1px;
vertical-align: middle;
vertical-align: middle;
color: white;
color: {{{text|white}}};
background:#{{#show: {{{1}}} |?Has display hex # }};">{{{1|}}}</span></includeonly>
background:#{{#show: {{{1}}} |?Has display hex # }};">{{{1|}}}</span></includeonly>

Revision as of 02:09, 1 December 2024

A template to display ink colors as chips.

Usage

{{Color chip|Violet}}

Template:Color chip

Advanced attributes

Some chips, such as yellow, will require black text. You can add the additional attribute `text=black` to change the overalying text color to Black.

{{Color chip|Yellow|text=black}}

Template:Color chip