Template:Color: Difference between revisions
Appearance
Add colour to text |
Dat Hack3r (talk | contribs) Fixed braces (we need syntax highlighting) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<templatestyles src="Color/styles.css" /> | <templatestyles src="Color/styles.css" /> | ||
<span class="color-box"> | <span class="color-box" style="background-color: #{{#ifeq:{{Greater color contrast ratio|{{#if:{{{1|}}}|{{{1}}}|{{{color|#000000}}}}}}}|#000000|444444|eeeeee}};"> | ||
<span class="color-text" style="color: {{#if:{{{1|}}}|{{#tag:nowiki|{{{1}}}}}|{{#tag:nowiki|{{{color|# | <span class="color-text" style="color: {{#if:{{{1|}}}|{{#tag:nowiki|{{{1}}}}}|{{#tag:nowiki|{{{color|#000000}}}}}}};{{#ifeq:{{Greater color contrast ratio|{{#if:{{{1|}}}|{{{1}}}|{{{color|#000000}}}}}}}|#000000|background-color: black;}}">{{#if:{{{1|}}}|{{#tag:nowiki|{{{1}}}}}|{{#tag:nowiki|{{{color|#000000}}}}}}}</span> | ||
<span class="color-fill" style="background-color: {{#if:{{{1|}}}|{{#tag:nowiki|{{{1}}}}}|{{#tag:nowiki|{{{color|# | <span class="color-fill" style="background-color: {{#if:{{{1|}}}|{{#tag:nowiki|{{{1}}}}}|{{#tag:nowiki|{{{color|#000000}}}}}}};"></span> | ||
</span> | </span> | ||
<noinclude> | <noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||