Template:Coltit: Difference between revisions
Jump to navigation
Jump to search
en>Crissov {{number sign}} |
en>Crissov support hash sign |
||
Line 1: | Line 1: | ||
<includeonly>title="{{{x|color {{uc:{{{rgb|{{number sign}}{{{1|fff}}}}}}}}}}}" style="background: {{#if:{{{rgb|}}}|rgb({{{rgb}}})|{{number sign}}{{{1|FFF}}}}}; color: {{#if:{{{color|}}}|rgb({{{color}}})|{{number sign}}{{{2|000}}}}}; text-align: {{#switch:{{{3|}}}|l=left|r=right|j=justify|c=center|a|#default=auto}}"| </includeonly><noinclude> | <includeonly>title="{{{x|color {{uc:{{{rgb|{{#ifeq:{{number sign}}|{{str left|{{{1|-}}}}}||{{number sign}}}}{{{1|fff}}}}}}}}}}}" style="background: {{{bg|{{#if:{{{rgb|}}}|rgb({{{rgb}}})|{{#ifeq:{{number sign}}|{{str left|{{{1|-}}}}}||{{number sign}}}}{{{1|FFF}}}}}}}}; color: {{#if:{{{color|}}}|rgb({{{color}}})|{{#ifeq:{{number sign}}|{{str left|{{{2|-}}}}}||{{number sign}}}}{{{2|000}}}}}; text-align: {{#switch:{{{3|}}}|<|start|s|left|l=left|>|end|e|right|r=right|<>|both|b|justify|j=justify|none|n|><|center|c=center|a|#default=auto}}"| </includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 11:47, 27 February 2020
This template might be used to color the background of a table cell; by the second parameter the text color can be specified. When the mouse pointer is located at the cell, the background color hex code triplet is displayed as a tooltip.
Usage
{{Coltit|RGB hex triplet of background color|RGB hex triplet of color|alignment letter|x=individual text}}
The template needs the colors hex code RGB or RRGGBB (not the color name); the 2nd parameters default value is 000 (black); possible alignement letters are: l (left), r (right) with default value center.
The parameter x=
specifies a title text header different from its default value (color #).
Example
{| class="wikitable"
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|#0ff|#f00}}'''turq''' and complementary color
|{{Coltit|rgb=12,34,56|color=75%,50%,25%}} using absolute 8-bit decimal and percentage RGB notation
|{{Coltit}} no parameters, all defaults
|{{Coltit|ffee11|x=yellow background colour}}
|-
| colspan=5 title="background color: #FB2" bgcolor=#FB2 style="color:#FB2;text-align:center" | '''The background should be <u>light orange</u>, not black &emsp; <small>(Internet Explorer ''short form bug'')'''</small>
|}
red and complementary color | turq and complementary color | using absolute 8-bit decimal and percentage RGB notation | no parameters, all defaults | |
The background should be light orange, not black (Internet Explorer short form bug) |
Move the mouse pointer to the table cell to see the background color value
See also
- {{Color}}
- {{Colors}}
- {{Background color}}
- {{Font color}}
- {{Resize}}