Jump to content

Template:Coltit/doc: Difference between revisions

From escforumwiki
en>Jc86035
mNo edit summary
Santos (talk | contribs)
m 17 revisions imported
 
(6 intermediate revisions by 4 users not shown)
Line 10: Line 10:
The parameter <code>x=</code> specifies a title text header different from its default value (color&ensp;#).  
The parameter <code>x=</code> specifies a title text header different from its default value (color&ensp;#).  


For example:
=== Example ===


<pre style="white-space:pre-wrap">
<syntaxhighlight lang="tid" style="white-space:pre-wrap">
{| class="wikitable"
{| class="wikitable"
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|0ff|f00}}'''turq''' 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}} no parameters, all defaults  
|{{Coltit|ffee11|x=yellow background colour=#}}  
|{{Coltit|ffee11|x=yellow background colour}}  
|-
|-
| colspan=4 title="background color: #FB2" bgcolor=#FB2 style="color:#FB2;text-align:center" | '''The background should be <u>light orange</u>, not black &amp;emsp; <small>(Internet Explorer ''short form bug'')'''</small>
| colspan=5 title="background color: #FB2" bgcolor=#FB2 style="color:#FB2;text-align:center" | '''The background should be <u>light orange</u>, not black &amp;emsp; <small>(Internet Explorer ''short form bug'')'''</small>
|}
|}
</pre>  results in  
</syntaxhighlight>  results in  
{| class="wikitable"
{| class="wikitable"
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|0ff|f00}}'''turq''' 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}} no parameters, all defaults  
|{{Coltit|ffee11|x=yellow background colour=#}}  
|{{Coltit|ffee11|x=yellow background colour}}  
|-
|-
| colspan=4 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>
| 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>'''
|}
|}
''Move the mouse pointer to the table cell to see the background color value''
''Move the mouse pointer to the table cell to see the background color value''
Line 38: Line 40:
* {{tl|Font color}}
* {{tl|Font color}}
* {{tl|Resize}}
* {{tl|Resize}}
::: and
 
=== Sibling projects ===
* {{Tl2|Coltit|lang=de}} (some differences, in German Wikipedia)
* {{Tl2|Coltit|lang=de}} (some differences, in German Wikipedia)
* {{Tl2|Coltit|sister=commons}} (more differences, in Wikimedia Commons)
* {{Tl2|Coltit|sister=commons}} (more differences, in Wikimedia Commons)


<includeonly>
<includeonly>{{Sandbox other||
<!-- CATEGORIES HERE, THANKS -->
<!-- CATEGORIES HERE, THANKS -->
[[Category:Text color templates]]
[[Category:Text color templates]]
 
[[Category:Table cell templates]]
</includeonly>
}}</includeonly>

Latest revision as of 21:19, 7 June 2022

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 &amp;emsp; <small>(Internet Explorer ''short form bug'')'''</small>
|}

results in

red and complementary color title="color
  1. 0FF" style="background: /* */#0ff; color: /* */#f00; text-align: auto;"| 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

Sibling projects

  • {{Coltit}} (some differences, in German Wikipedia)
  • {{Coltit}} (more differences, in Wikimedia Commons)


MediaWiki spam blocked by CleanTalk.