Colour and contrast

Contrast checker

#63c

What do the numbers mean?

Each colour code has three or six digits, split into red, green and blue components. Use the 4,096 colour table to help find a code or see the poster for a more detailed explanation. They are usually written with a # at the start.

Contrast table


Colour table

This colour table is based on 216 main colours with up to 26 tints each. Each table is ordered from dark to light, then hue, then dull to vivid.

There are 4,096 named colours in total. For example, sulphur is #cc3 and sulphur (yellow tint) is #dd2.

The 'tints' button shows all available tints. The 'contrast' button checks the contrast ratio with other colours. The same information is also in poster form.

grey

colour name more info

red

colour name more info

orange

colour name more info

brown

colour name more info

amber

colour name more info

yellow

colour name more info

avocado

colour name more info

cucumber

colour name more info

lime

colour name more info

green

colour name more info

spring

colour name more info

emerald

colour name more info

jade

colour name more info

cyan

colour name more info

aqua

colour name more info

sky

colour name more info

azure

colour name more info

blue

colour name more info

indigo

colour name more info

plum

colour name more info

iris

colour name more info

magenta

colour name more info

pink

colour name more info

rose

colour name more info

coral

colour name more info

Chrysanthemum colour poster

This poster shows all 4,096 colours with 3-digit codes, from #000 (black) to #fff (white). Click/tap for a larger version, or view the colours in a table instead.

Colour poster featuring 216 chrysanthemum flowers arranged into a hexagonal shape by colour

The centre of each chrysanthemum flower is one of 216 main colours with up to 24 tints each in the petals, plus 2 more either side of the centre. A small dot means that a tint doesn't exist. For example, red has no pink tint.

The three digits represent red, green and blue, where 10-15 are written as a-f. Example: indigo is #63c (6 red, 3 green, 12 blue).

Use the Tints flower to identify each tint and work out its code. Example: indigo's red tint is in the 12 o'clock position. The tint's code is: #63c → plus minus minus (+−−) → #72b.

Change a short code to a long code by repeating each digit, for example, #db4 = #ddbb44.

The colour names on the chart are written in black or white depending on which has better contrast for web content accessibility guidelines.


About

Being interested in art, maths and web design, I'm fascinated by colours and how they relate to each other.

As an accessibility auditor and occasional putter of things on the web, I also need to compare the contrast of colours regularly.

The code for both the contrast checker and colour poster is written in "vanilla" Javascript - this is the first interactive Javascript thing I've made. The code was started in 2015.

The poster was inspired by the 216 colour webmaster's palette by Visibone. Given that the 216 "web-safe" colours were in a 6×6×6 colour space I wanted to find a way to present a 3 dimensional cube of these colours in two dimensions. This then extended to a more granular 4,096 colours in a 16×16×16 colour space.

Other contrast checkers

The following tools are all free and help you check colour contrast on the web.

Credits

The contrast checker "borrows" code from several places. In particular, thanks to:

Colour names come from a number of sources, and I've made up a few. Particular thanks to: