Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

Difference between revisions of "Template:Colorsample"

From Paragon Wiki Archive
Jump to: navigation, search
(Created page with '<includeonly>| style="position: relative; height: 20px; width: 20px; vertical-align: middle;{{#if:{{{cellborders|}}}| border: solid black; border-width: {{{cellborders}}};}}"|<di…')
 
(No difference)

Latest revision as of 21:24, 15 February 2010

[edit] [purge] Documentation

Usage

{| style="border: solid black 1px;"
|-
{{colorsample|rgb=000000|text=A1}}
{{colorsample|rgb=1F1F1F|text=A2}}
{{colorsample|rgb=3B3B3B|text=A3}}
{{colorsample|rgb=575757|text=A4}}
{{colorsample|rgb=737373|text=A5}}
{{colorsample|rgb=8F8F8F|text=A6|textcolor=black}}
{{colorsample|rgb=ABABAB|text=A7|textcolor=black}}
{{colorsample|rgb=C7C7C7|text=A8|textcolor=black}}
{{colorsample|rgb=E3E3E3|text=A9|textcolor=black}}
{{colorsample|rgb=FFFFFF|text=A10|textcolor=black}}
|}

The above will display:

Color 000000.png
A1
Color 1F1F1F.png
A2
Color 3B3B3B.png
A3
Color 575757.png
A4
Color 737373.png
A5
Color 8F8F8F.png
A6
Color ABABAB.png
A7
Color C7C7C7.png
A8
Color E3E3E3.png
A9
Color FFFFFF.png
A10

This template emits the markup for a table cell. It must be used within a wiki table, as shown in the example above.

Parameters

Parameter Example Purpose
rgb= rgb=575757 Required. Must be a 6-character RGB color value. Do not prefix with the # sign. This is used to construct the image name to display for the color sample.
text= text=D8 Required. Specifies what text should get displayed over the sample. This should be no more than about 2 to 3 characters in length.
textcolor= textcolor=black The text color is white by default. This shows up well on dark colors, but less well on light colors. Use This parameter to set the text color to black when sampling light colors.
cellborders= cellborders=0 0 1px 0 For advanced uses, it is sometimes necessary to define borders on a cell-by-cell basis. This parameter specifies width information for the cells. It must be four values, representing the top, right, bottom, and left. Use 0 for sides that should be left blank; use 1px where you want a border. The border will be solid black.