Red, green, and blue are the primary colours of light; red and green together make yellow, green and blue together make cyan, blue and red make magenta, and all three combined give you white—assuming all are at full strength. Red-Green-Blue (or RGB
) and Hexadecimal (Hex
) Notation set the precise levels of red, green, and blue colours on the screen using values from 0 to 255, allowing for 256 levels for each and thus 16,777,216 colours in total. Hex and RGB notation are exact equivalents; the only difference is that Hex displays colours in Base 16; RGB in Base 10.
There's also a list of colour names that correspond to RGB and Hex codes; choosing those will shift the codes to the appropriäte values.
The table to the right will show the resulting codes of the settings to the left. CHx
stands for Compact Hexadecimal
, which is a Hexadecimal code written with three digits instead of 6. This can only happen when each pair of digits contain the same digits—for example, LightSlateGray
has a Hex code of #778899
, which means it can also be written as #789
. Orange
, on the other hand, is #FFA500
, which means it must be written in full.
RGB and Hex are the older two ways of setting colour, CSS 3 also introduced Hue-Saturation-Lightness, which has its own page. Just a note, though, your browser must support XHTML + SVG and CSS 3 for the page to work. To make finding out easy, I put an XHTML/SVG/CSS 3 graphic coloured via HSL. In short, if there's a green checkmark beside the link to the Hue-Saturation-Lightness page, you're good to go.
JavaScript is NOT enabled. If you want to use this page, please enable Javascript.
Notation | Code |
---|---|
RGB | rgb(255,255,255) |
Hex | #FFFFFF |
CHx | #FFF |
Name(s) | White |
Red | Green | Blue | All | |
---|---|---|---|---|
‡—Valid HTML Colour Name | ||||
Hex | ||||
RGB | ||||
+ | ||||
- | ||||
Name |