Help:Colour

Colour (color to our transatlantic cousins) on computer screens is made up of 3 "primary" colours: red, green and blue. You will often see this referred to as "RGB", these colours are "additive": zero of all three gives black, while maximum of all three makes white.

Colours by number
Computers work with powers of two. The relevant vocabulary for describing colours uses "hexadecimal", which is base sixteen.
 * 0 (zero) to 15 (which is 16 or 24 higher), using one hex digit for each base colour, for a total of 163, or 4,096 values.
 * 0 (Zero) to 255 (which is 256 or 28 higher), using two hex digits for each colour, yielding a total of 2563, or 16,777,216 values''; Each base colour (red, green, and blue) can have a value in one of these ranges.

Hexadecimal colour codes are preceded by "#".

Using the 0-15 method, a RGB colour is represented as #000 for black, through #FFF for white.

In the 0-255 method, black is #000000 and white is #FFFFFF.

Note that equal amounts of red, green and blue produce various shades of gray. Pure reds are of the form #X00 or #XX0000, greens are #0X0 or #00XX00, and pure blue shades are #00X #0000XX. Any colour combination can be created using any number from 00 to FF in each of the three positions, a smaller number use just three numbers of course.

Colours by name
There are also palettes of named colours.

Text colour coding
Note: colour is spelled without the u in all HTML & CSS.

Using CSS color attribute:


 * red writing
 * green writing
 * blue writing
 * green writing
 * blue writing
 * blue writing

This has the advantage that other attributes can be included in the same "span" tag.

The use of the HTML tags: ; is still valid but deprecated:
 * RED TEXT
 * RED TEXT
 * GREEN TEXT
 * GREEN TEXT
 * BLUE TEXT <
 * BLUE TEXT

Shortcuts
Another way to get the colour you want is to use a site like this one where you can play with an infinitely variable set of colours until you find one you like.

Other use of colours
Colours can also be defined in other html tags, such as table tags. BGCOLOR="#abcxyz" will set the background color of a table, row, or cell when used inside the appropriate tag. Wiki table colours can also be defined using the "style" attribute.

Examples to copy
As with many tricks and tools on computers, copying something you like is often the quickest way to get there.