Template:Color: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Moved documentation.)
No edit summary
Line 2: Line 2:
<includeonly><onlyinclude><kbd style="display:inline-flex; flex-direction:row; align-items:baseline; width:fit-content; margin:0 2px; color:lightgrey"><!--
<includeonly><onlyinclude><kbd style="display:inline-flex; flex-direction:row; align-items:baseline; width:fit-content; margin:0 2px; color:lightgrey"><!--


--><kbd style="user-select:none; background:rgb({{{rgb|{{{r|0}}}}}},{{{rgb|{{{g|0}}}}}},{{{rgb|{{{b|0}}}}}}); color:rgb(0,0,0,0); min-width:11px; min-height:11px; border:1px solid #444; border-right:0; padding:0 1px; border-radius:4px 0 0 4px">⇆</kbd><!--
--><kbd style="user-select:none; background:rgb({{{rgb|{{{r|0}}}}}},{{{rgb|{{{g|0}}}}}},{{{rgb|{{{b|0}}}}}}); color:rgb(0,0,0,0); min-width:11px; min-height:11px; border:1px solid #444; border-right:0; padding:0 1px; border-radius:4px 0 0 4px" title="Click to switch between RGB and Hex.">⇆</kbd><!--


--><kbd style="user-select:all; background-color:rgba(0,0,0,.16); border:1px solid #444; padding:0 2px"><!--
--><kbd style="user-select:all; background-color:rgba(0,0,0,.16); border:1px solid #444; padding:0 2px"><!--
Line 30: Line 30:
--></kbd></kbd><!--
--></kbd></kbd><!--


--><kbd class="mw-customtoggle-coltype{{{rgb|{{{r|0}}}}}}{{{rgb|{{{g|0}}}}}}{{{rgb|{{{b|0}}}}}}{{{a|}}}" style="user-select:none; background-color:rgba(0,0,0,.16); border:1px solid #444; border-left:0; padding:0 2px; border-radius:0 4px 4px 0">⇆</kbd><!--
--><kbd class="mw-customtoggle-coltype{{{rgb|{{{r|0}}}}}}{{{rgb|{{{g|0}}}}}}{{{rgb|{{{b|0}}}}}}{{{a|}}}" style="user-select:none; background-color:rgba(0,0,0,.16); border:1px solid #444; border-left:0; padding:0 2px; border-radius:0 4px 4px 0" title="Click to switch between RGB and Hex.">⇆</kbd><!--


--></kbd></onlyinclude></includeonly>
--></kbd></onlyinclude></includeonly>

Revision as of 20:10, 9 May 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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}} #000000
| 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}} #C88040
| 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}}
#636363
#404040
| a = <0.0-1.0> Alpha channel. {{Color|rgb=80|b=220|a=.6}} #50505099
Icon-Bug.pngBug: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: #808080 and #808080.