Difference between revisions of "Template:Coltit/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sarang
(test)
 
imported>Sarang
m (expansion)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  
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 is shown.
+
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.
  
 
=== Usage ===
 
=== Usage ===
  
{{Tlx|Coltit|RGB hex triplet of background color|RGB hex triplet of color|alignement letter}}
+
{{Tlx|Coltit|RGB hex triplet of background color|RGB hex triplet of color|alignement letter|x&#x3d;individual text}}
  
The template needs the colors hex code RGB or RRGGBB (''not'' the color ''name''); the 2<sup>nd</sup> parameters default value is 000 (black); possible alignement letters are: l (''left''), r (''right'') with default value ''center''.
+
The template needs the colors hex code RGB or RRGGBB (''not'' the color ''name''); the 2<sup>nd</sup> parameters default value is 000 (black); possible alignement letters are: l (''left''), r (''right'') with default value ''center''.<br>
 +
The parameter <code>x=</code> specifies a title text header different from its default value (color=#).  
  
 
For example:
 
For example:
Line 16: Line 17:
 
|{{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}} no parameters, all default
+
|{{Coltit}} no parameters, all defaults
 +
|{{Coltit|FF0|x=yellow background color=#}}
 
|}
 
|}
 
</pre>  results in  
 
</pre>  results in  
Line 22: Line 24:
 
|{{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}} no parameters, all default
+
|{{Coltit}} no parameters, all defaults
 +
|{{Coltit|FF0|x=yellow background color=#}}
 
|}
 
|}
 
''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''

Revision as of 09:26, 14 November 2011

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.

Usage

{{Coltit|RGB hex triplet of background color|RGB hex triplet of color|alignement 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=#).

For example:

{| class="wikitable"
|{{Coltit|F00|0FF}}'''red''' and complementary color
|{{Coltit|0FF|F00}}'''turq''' and complementary color
|{{Coltit}} no parameters, all defaults 
|{{Coltit|FF0|x=yellow background color=#}} 
|}

results in

title="color F00" style="background: /* */Template:Number signF00; color: /* */Template:Number sign0FF; Template:Text-align"| red and complementary color title="color 0FF" style="background: /* */Template:Number sign0FF; color: /* */Template:Number signF00; Template:Text-align"| turq and complementary color title="color #FFF" style="background: /* */Template:Number sign#FFF; color: /* */Template:Number sign#000; Template:Text-align"| no parameters, all defaults title="yellow background color=#" style="background: /* */Template:Number signFF0; color: /* */Template:Number sign#000; Template:Text-align"|

Move the mouse pointer to the table cell to see the background color value

See also

and