Template:Color: Difference between revisions
Jump to navigation
Jump to search
(Moved documentation.) |
mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude><span style="white-space:nowrap; color:#DDD; user-select:all"><!-- | |||
<includeonly><onlyinclude>< | |||
-- | ------ Color Square | ||
-->< | --><span style="display:inline-block; width:8px; height:8px; margin-bottom:-1px; border:1px solid #525252; background:linear-gradient(#000, rgb({{{r|{{{rgb|0}}}}}},{{{g|{{{rgb|0}}}}}},{{{b|{{{rgb|0}}}}}},{{{a|1}}}) 0%), repeating-conic-gradient(#FFF 0 25%,#AAA 0 50%)"></span><!-- | ||
-- | ------ Arrows Button | ||
-->< | --><span class="mw-customtoggle-color{{{rgb|0}}}{{{r|0}}}{{{g|0}}}{{{b|0}}}{{{a|1}}}" style="margin:0 .3em; user-select:none"><span style="display:inline-block; width:8px; height:10px; margin-bottom:-1px; background:#FFF; clip-path:path('M4 0l4 4H6L4 2 2 4H0m4 6L0 6h2l2 2 2-2h2')"></span></span><!-- | ||
-- | ------ HEX Format | ||
--></ | --><samp id="mw-customcollapsible-color{{{rgb|0}}}{{{r|0}}}{{{g|0}}}{{{b|0}}}{{{a|1}}}" class="mw-collapsible">#{{#switch:{{#expr:floor({{{r|{{{rgb|0}}}}}} / 16)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | ||
-->{{#switch:{{#expr:{{{r|{{{rgb|0}}}}}} mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#switch:{{#expr:floor({{{g|{{{rgb|0}}}}}} / 16)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#switch:{{#expr:{{{g|{{{rgb|0}}}}}} mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#switch:{{#expr:floor({{{b|{{{rgb|0}}}}}} / 16)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#switch:{{#expr:{{{b|{{{rgb|0}}}}}} mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#if:{{{a|}}}|{{#switch:{{#expr:floor((({{{a}}} * 255) round 0) / 16)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}<!-- | |||
-->{{#switch:{{#expr:(({{{a}}} * 255) round 0) mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}}}</samp><!-- | |||
-- | ------ RGB Format | ||
--></ | --><samp id="mw-customcollapsible-color{{{rgb|0}}}{{{r|0}}}{{{g|0}}}{{{b|0}}}{{{a|1}}}" class="mw-collapsible mw-collapsed" style="display:none">rgb({{{r|{{{rgb|0}}}}}},{{{g|{{{rgb|0}}}}}},{{{b|{{{rgb|0}}}}}}{{#if:{{{a|}}}|,{{{a}}}}})</samp><!-- | ||
--></span></onlyinclude></includeonly> | |||
{{Doc}} | |||
[[Category:Mathematics templates]] | |||
Latest revision as of 18:29, 10 October 2025
The above documentation is transcluded from Template:Color/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.