Template:Color/doc: Difference between revisions
Jump to navigation
Jump to search
Bug:If the same color is specified on the page, then pressing the arrow button will change the HEX/RGB display for all the same colors at once: #808080rgb(128,128,128) and #808080rgb(128,128,128).
m (→Parameters and Examples: "a" always means alpha channel) |
No edit summary |
||
Line 2: | Line 2: | ||
== Usage == | == Usage == | ||
You can click on the arrow icon to change the color display from HEX to RGB and back. | |||
{| class="standard-table" | style="text-align:center" | |||
{| class="standard-table" | style=" | |||
|- | |- | ||
! Parameter | ! Parameter | ||
Line 11: | Line 10: | ||
! Preview | ! Preview | ||
|- | |- | ||
|No parameters | | No parameters | ||
| | | If no parameters are specified, the template will display black color. | ||
|{{Code| | | {{Code|{{T|Color}}}} | ||
|{{Color}} | | {{Color}} | ||
|- | |- | ||
|{{Code|< | | {{Code|{{P| r | <0-255>}}}}<br>{{Code|{{P| g | <0-255>}}}}<br>{{Code|{{P| b | <0-255>}}}} | ||
|Setting the values | | Setting the values of red, green and blue colors respectively. | ||
|{{Code| | | {{Code|{{T|Color|{{P|r|200}}{{P|g|128}}{{P|b|64}}}}}} | ||
|{{Color|r=200|g=128|b=64}} | | {{Color|r=200|g=128|b=64}} | ||
|- | |- | ||
|{{Code| | | {{Code|{{P| rgb | <0-255>}}}} | ||
|Controls | | Controls all three colors at once. If a separate color value is specified, it will take precedence. | ||
|{{Code| | | {{Code|{{T|Color|{{P|rgb|99}}}}}}<br>{{Code|{{T|Color|{{P|rgb|64}}{{P|g|255}}}}}} | ||
|{{Color|rgb= | | {{Color|rgb=99}}<br>{{Color|rgb=64|g=255}} | ||
|- | |- | ||
|{{Code| | | {{Code|{{P| a | <0.0-1.0>}}}} | ||
|Alpha channel | | Alpha channel. | ||
|{{Code| | | {{Code|{{T|Color|{{P|rgb|80}}{{P|b|220}}{{P|a|.6}}}}}} | ||
|{{Color| | | {{Color|rgb=80|b=220|a=.6}} | ||
|} | |} | ||
{{Bug|hidetested=1|If the same color is specified on the page, then pressing the arrow button will change the HEX/RGB display for all the same colors at once: {{Color|rgb=128}} and {{Color|rgb=128}}.}} | |||
<includeonly>[[Category:Notice templates|{{PAGENAME}}]]</includeonly> | <includeonly>[[Category:Notice templates|{{PAGENAME}}]]</includeonly> |
Latest revision as of 05:23, 27 September 2025

This is a documentation subpage for Template:Color.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Usage
You can click on the arrow icon to change the color display from HEX to RGB and back.
Parameter | Description | Example | Preview |
---|---|---|---|
No parameters | If no parameters are specified, the template will display black color. | {{Color}} | #000000rgb(0,0,0) |
| r = <0-255> | g = <0-255> | b = <0-255> |
Setting the values of red, green and blue colors respectively. | {{Color|r=200|g=128|b=64}} | #C88040rgb(200,128,64) |
| rgb = <0-255> | Controls all three colors at once. If a separate color value is specified, it will take precedence. | {{Color|rgb=99}} {{Color|rgb=64|g=255}} |
#636363rgb(99,99,99) #40FF40rgb(64,255,64) |
| a = <0.0-1.0> | Alpha channel. | {{Color|rgb=80|b=220|a=.6}} | #5050DC99rgb(80,80,220,.6) |
