Hex codes for common colours
These are the standard CSS colour names, which every browser understands. Type any of these names into the HEX field to load it:
- White #FFFFFF, rgb(255, 255, 255). Black #000000, rgb(0, 0, 0).
- Red #FF0000, crimson #DC143C, maroon #800000.
- Blue #0000FF, dark blue #00008B, navy #000080, royal blue #4169E1, sky blue #87CEEB.
- Green #008000, lime #00FF00, forest green #228B22, teal #008080.
- Yellow #FFFF00, gold #FFD700, orange #FFA500.
- Purple #800080, violet #EE82EE, pink #FFC0CB, hot pink #FF69B4.
- Brown #A52A2A, silver #C0C0C0, gray #808080, light gray #D3D3D3, dark gray #A9A9A9.
One oddity: CSS “darkgray” (#A9A9A9) is lighter than plain “gray” (#808080), because the names come from two older colour lists that were merged. If you need a dark grey for text, something like #333333 or #4B5563 is a better choice.
How a hex code turns into RGB
A six-digit hex code is three pairs of base-16 digits, one each for red, green and blue. Each pair runs from 00 (0) to FF (255). In #4169E1, 41 is 4 × 16 + 1 = 65 red, 69 is 6 × 16 + 9 = 105 green and E1 is 14 × 16 + 1 = 225 blue, so it is rgb(65, 105, 225).
The three-digit form doubles each digit: #F80 is the same as #FF8800. Eight-digit codes such as #4169E180 add an alpha (transparency) pair at the end; this converter takes the three- and six-digit forms, so leave the last pair off.
Converting RGB to CMYK for print
Screens mix light (RGB) and printers mix ink (CMYK: cyan, magenta, yellow and black). The converter uses the standard formula: K is how dark the colour is, 1 − the brightest of R, G and B, and C, M and Y are what is left of each channel once that black is taken out. Dark red, rgb(128, 0, 0), comes out as 0% cyan, 100% magenta, 100% yellow and 50% black.
You can also type CMYK values into the CMYK field to get the screen colour back. Treat the result as a starting point: real printers use colour profiles for the paper and press (such as FOGRA39 or GRACoL), and some bright screen colours, especially vivid greens and blues, simply cannot be printed. Ask your printer for a proof when the colour matters.
HSL, HSV and when to use them
HSL describes a colour by hue (the angle on the colour wheel, 0–360°), saturation and lightness. It is the easiest format for making variations by hand: keep the hue, change the lightness, and you get a tint or shade of the same colour. The Lighten, Darken and shade swatches here work that way.
HSV (also called HSB) uses value instead of lightness and is what design apps such as Photoshop and Figma show in their colour pickers. A fully saturated red is hsl(0, 100%, 50%) but hsv(0, 100%, 100%), which is why numbers copied between the two do not match.
What about Pantone?
Pantone colours are a proprietary, licensed system of physical ink recipes, so there is no exact formula from a hex code to a Pantone number. Online “hex to Pantone” tools only find the nearest swatch in a table, and printed Pantone inks often look different from their screen preview. If a brand uses a Pantone colour, take the official HEX, RGB and CMYK values from its brand guide and use this tool to check them.