Template:color box: Difference between revisions

From sona pona, the Toki Pona wiki
Content added Content deleted
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<span style="color: {{{color}}}; font-size: 200%">⬛︎</span>
<span style="color: {{{1}}}; font-size: 125%; line-height: 80%">⬛︎</span><noinclude>
== Documentation ==
<noinclude>
This template types a big square character of the needed color. The color can be any CSS-valid color, here are some examples:

{| class="wikitable"
! Template usage !! Result
|-
| <nowiki>{{color box|darkviolet}}</nowiki> || {{color box|darkviolet}}
|-
| <nowiki>{{color box|#FF0000}}</nowiki> || {{color box|#FF0000}}
|-
| <nowiki>{{color box|rgb(210, 105, 30)}}</nowiki> || {{color box|rgb(210, 105, 30)}}
|}
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"color": {
"1": {
"aliases": [
"aliases": [
"1"
"color"
],
],
"label": "color",
"description": "the desired color of the box.",
"example": "dodgerblue",
"type": "string",
"type": "string",
"required": true,
"required": true,
"suggested": true
"suggested": true,
"suggestedvalues": [
"red",
"orangered",
"gold",
"limegreen",
"aqua",
"dodgerblue",
"blue",
"blueviolet",
"fuchsia"
]
}
}
},
},
"format": "inline"
"format": "inline",
"paramOrder": [
"1"
],
"description": "colored square"
}
}
</templatedata>
</templatedata>

Latest revision as of 19:44, 4 February 2024

⬛︎

Documentation[edit source]

This template types a big square character of the needed color. The color can be any CSS-valid color, here are some examples:

Template usage Result
{{color box|darkviolet}} ⬛︎
{{color box|#FF0000}} ⬛︎
{{color box|rgb(210, 105, 30)}} ⬛︎

colored square

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
color1 color

the desired color of the box.

Suggested values
red orangered gold limegreen aqua dodgerblue blue blueviolet fuchsia
Example
dodgerblue
Stringrequired