Template talk:C

From The Urban Dead Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

This template is a shorthand for changing the color of text.

You can use it in two ways:

  • {{C|color|text}}
  • {{C|color|text|background color}}

Colors can be given by name, such as "Red" or "SpringGreen". A full list can be found at Help:Web Colours.

They can also be given in hexadecimal format from "#000000" (black) to "#FFFFFF" (white). For example #FF8000 all red, some green and no blue, giving orange.

An rgb format can also be used from "rgb(0, 0, 0)" (black) to "rgb(255, 255, 255)" (white). The previous orange would be "rgb(255, 128, 0)" in this format.

An alpha component can be specified in the extended rgba format. The fourth number varies between 0 and 1, 0 being transparent and 1 being fully opaque. "rgba(0, 0, 0, 0)" (transparent black), "rgba(0, 0, 0, 0.5)" (semi-transparent black), "rgba(0, 0, 0, 1)" (opaque black).

Examples

Code Result
{{C|red|named color}} named color
{{C|#505050|hex code}} hex code
{{C|rgb(255, 0, 128)|rgb code}} rgb code
{{C|white|background color|black}} background color
{{C|#FFF|shorthand hex code|#F00}} shorthand hex code
{{C|rgba(255, 255, 255, 0.25)|barely visible|black}} barely visible