Color blind friendly palettes with hex codes and computed contrast ratios

A color blind friendly palette is a set of colours chosen so that people with the common forms of colour vision deficiency can still tell them apart. The most cited are the Okabe-Ito palette, Paul Tol's bright and high-contrast schemes and IBM's five-colour set. Hue is half the job: WCAG 1.4.1 says colour must never be the only cue, and text and chart lines still need enough contrast. All four palettes are below with hex codes and computed ratios.

  • Template
  • 7 groups
  • 9 checks
  • Updated

A palette that is safe for colour-blind readers is a choice of hues that stay apart when one type of cone cell in the eye is missing or shifted. Masataka Okabe and Kei Ito, who published the most widely used one, put the frequency of red-green colour blindness at one in twelve Caucasian men, one in twenty Asian men and one in twenty-five African men, and note that a room of 250 people will hold more than ten colour-blind readers. Every chart, status badge and error message on a website is read by some of them.

Watercolour of a pale wooden palette with five paint wells in blue, olive, graphite, ochre and burnt orange.

In the checklist

  1. Okabe-Ito palette
  2. Paul Tol bright scheme
  3. Paul Tol high-contrast scheme
  4. IBM colour-blind safe set
  5. Pairs for two-colour charts
  6. Colours for text and lines
  7. Checks before the palette ships 9

Color blind friendly palette, ready to copy

Copy it as it is. There is no email step, and nothing on this page is behind one.

0 of 9 ticked

Okabe-Ito palette

Eight colours from Masataka Okabe and Kei Ito, Color Universal Design. Ratios computed with the WCAG 2.2 formula.

NameHexRGBOn whiteOn black
Orange#E69F00230, 159, 02.25:19.32:1
Sky blue#56B4E986, 180, 2332.30:19.10:1
Bluish green#009E730, 158, 1153.42:16.13:1
Yellow#F0E442240, 228, 661.32:115.88:1
Blue#0072B20, 114, 1785.18:14.04:1
Vermilion#D55E00213, 94, 03.86:15.43:1
Reddish purple#CC79A7204, 121, 1673.06:16.86:1
Black#0000000, 0, 021.00:11.00:1

Paul Tol bright scheme

Tol's default qualitative scheme, in his suggested order: blue, red, green, yellow, cyan, purple, grey.

NameHexRGBOn whiteOn black
Blue#4477AA68, 119, 1704.70:14.46:1
Cyan#66CCEE102, 204, 2381.83:111.43:1
Green#22883334, 136, 514.52:14.63:1
Yellow#CCBB44204, 187, 681.95:110.75:1
Red#EE6677238, 102, 1193.08:16.80:1
Purple#AA3377170, 51, 1196.08:13.44:1
Grey#BBBBBB187, 187, 1871.91:110.93:1

Paul Tol high-contrast scheme

Three colours plus white and black that also work in greyscale and in a monochrome printout.

NameHexRGBOn whiteOn black
Blue#0044880, 68, 1369.62:12.18:1
Yellow#DDAA33221, 170, 512.12:19.87:1
Red#BB5566187, 85, 1024.56:14.60:1

IBM colour-blind safe set

Five colours from the IBM Design Language colour library, named as IBM named them.

NameHexRGBOn whiteOn black
Ultramarine 40#648FFF100, 143, 2553.03:16.91:1
Indigo 50#785EF0120, 94, 2404.50:14.65:1
Magenta 50#DC267F220, 38, 1274.53:14.62:1
Orange 40#FE6100254, 97, 03.03:16.92:1
Gold 20#FFB000255, 176, 01.83:111.46:1

Pairs for two-colour charts

A ratio of 3:1 or more between the two means lightness separates them as well as hue. Under 3:1, add a label, a pattern or a marker shape.

PairRatio between themHow to use it
Okabe-Ito blue #0072B2 and yellow #F0E4423.92:1Hue and lightness both differ
Tol high-contrast blue #004488 and yellow #DDAA334.52:1Hue and lightness both differ, and the pair survives greyscale
Okabe-Ito blue #0072B2 and orange #E69F002.30:1A cool and a warm hue, the pairing Okabe and Ito advise; add labels
Tol bright blue #4477AA and red #EE66771.52:1Distinct hues, near-equal lightness; add labels
IBM Ultramarine 40 #648FFF and Gold 20 #FFB0001.65:1Distinct hues, near-equal lightness; add labels
Okabe-Ito bluish green #009E73 and vermilion #D55E001.13:1The replacement for green and red; never without a word or an icon

Colours for text and lines

On a white background, body text needs 4.5:1 and large text (18 point, or 14 point bold) 3:1. Chart lines, bars, icons and control borders need 3:1.

ColourHexOn whiteBody text on whiteLines and icons on white
Tol high-contrast blue#0044889.62:1PassesPasses
Tol bright purple#AA33776.08:1PassesPasses
Okabe-Ito blue#0072B25.18:1PassesPasses
Tol bright blue#4477AA4.70:1PassesPasses
Tol high-contrast red#BB55664.56:1PassesPasses
IBM Magenta 50#DC267F4.53:1PassesPasses
Tol bright green#2288334.52:1PassesPasses
IBM Indigo 50#785EF04.50:1Passes, with no marginPasses
Okabe-Ito vermilion#D55E003.86:1Large text onlyPasses
Okabe-Ito bluish green#009E733.42:1Large text onlyPasses
Tol bright red#EE66773.08:1Large text onlyPasses
Okabe-Ito reddish purple#CC79A73.06:1Large text onlyPasses
IBM Ultramarine 40 and Orange 40#648FFF, #FE61003.03:1Large text onlyPasses

Under 3:1 on white, so fills on a dark background or shapes with a dark outline only: Okabe-Ito orange, sky blue and yellow, Tol bright cyan, yellow and grey, Tol high-contrast yellow, IBM Gold 20.

Checks before the palette ships

The sheet below has four palettes copied from their authors: the eight Okabe-Ito colours, Paul Tol's bright and high-contrast schemes from his technical note on colour schemes, and the five colours IBM's design language set aside as colour-blind safe. Each colour carries its contrast ratio on white and on black, computed with the WCAG 2.2 formula rather than copied from another site. Two shorter tables follow: which pairs work for a two-colour chart, and which colours can carry text or a chart line on a white page.

Colour-blind safe hues do not make a page accessible on their own. Several colours in every palette here fail as text on white, and WCAG 1.4.1 asks for a second cue wherever colour carries meaning. The checks at the end cover both, and the accessibility checklist in this collection covers the rest of a page.

What each group is for

Scroll the table sideways for the examples.

Group Why it earns its place Example
Okabe-Ito palette The eight colours from Okabe and Ito's Color Universal Design guide, the palette most data visualisation books start from. Claus Wilke, who uses it throughout Fundamentals of Data Visualization, tabulates its hex and RGB values, and those are the values given here. The authors chose vermilion for red because protanopes can still see it, bluish green so it is never confused with red or brown, and reddish purple because violet and blue look alike to colour-blind readers. Blue | #0072B2 | 0, 114, 178 | 5.18:1 | 4.04:1
Paul Tol bright scheme Tol's default scheme for qualitative data, from his note SRON/EPS/TN/09-002, issue 3.2 of 18 August 2021. He designed it to stay distinct for colour-blind readers, against black and white, and on screen and paper, and he gives an order for picking the colours in sequence. His note says the blue, green and purple can carry text on white, and the computed ratios here agree. Purple | #AA3377 | 170, 51, 119 | 6.08:1 | 3.44:1
Paul Tol high-contrast scheme Three colours with white and black that Tol optimised for contrast, so they also work for readers with monochrome vision and in a black-and-white printout. Use it when a chart has three series or fewer, or when it may be printed. Tol gives the contrast between its blue and yellow as 4.52, the same value the formula on this page produces. Blue | #004488 | 0, 68, 136 | 9.62:1 | 2.18:1
IBM colour-blind safe set Five colours from the IBM Design Language colour library, read in the Wayback Machine copy of that page from 3 May 2018, since the page has moved off IBM's site. The names are IBM's own swatch names, which say where each colour sits in its family. Gold 20 is the lightest and fails on white, so it belongs on dark backgrounds or inside an outline. Magenta 50 | #DC267F | 220, 38, 127 | 4.53:1 | 4.62:1
Pairs for two-colour charts The pairs to reach for when a chart compares two things. A ratio of 3:1 or more between the two colours means they differ in lightness as well as hue, which W3C's note on WCAG 1.4.1 accepts as a second visual distinction. Under 3:1 the pair is still safer than red and green, but the series need a label, a pattern or a marker shape. Okabe-Ito blue #0072B2 and yellow #F0E442 | 3.92:1 | Hue and lightness both differ
Colours for text and lines Which palette colours can carry text, and which can only carry a chart line or an icon, on a white page. WCAG 1.4.3 asks 4.5:1 for body text and 3:1 for large text, and 1.4.11 asks 3:1 for the parts of a graphic needed to understand it. The list under the table names the colours that pass neither, which is where most palette mistakes on a website start. Okabe-Ito vermilion | #D55E00 | 3.86:1 | Large text only | Passes
Checks before the palette ships The checks that decide whether the palette works on the real page, and not only in a design file. Each one maps to a WCAG success criterion or to a practice Okabe and Ito recommend, such as labelling series on the chart. The last check asks for every failure to be filed with the colours and the ratio, so the fix does not depend on somebody remembering what they saw. [ ] Error and success carry an icon or a word, never red and green alone

A color blind friendly palette handed over badly, and the same palette handed over usably

Not this

Chart colours: green for on target, red for behind. Use the brand green and red.

This instead

Chart colours: Okabe-Ito blue #0072B2 for on target, orange #E69F00 for behind. Every bar shows its value and the words On target or Behind. Blue bars reach 5.18:1 on the white card. Orange is 2.25:1, so orange bars get a 1px #000000 outline. Status text uses black, with an icon for each state.

The first note picks the one pair red-green colour-blind readers confuse most and leaves the legend as the only way to tell the bars apart. The second names the hex codes, puts a word on every bar so colour is never the only cue, and states the ratio behind each choice. A developer can build it without a follow-up question, and a tester can check it line by line.

How the contrast ratios on this page were computed

Every ratio on this page was computed for it, with the formulas in WCAG 2.2. Each of the red, green and blue channels is divided by 255 and converted to linear light: a value at or under 0.04045 is divided by 12.92, and any other value has 0.055 added, is divided by 1.055 and is raised to the power 2.4. The relative luminance is then 0.2126 times red, plus 0.7152 times green, plus 0.0722 times blue. The contrast ratio between two colours is the lighter luminance plus 0.05, divided by the darker luminance plus 0.05, which gives a number from 1 to 21. The results are cut to two decimals and never rounded up, because W3C says a computed value is not rounded to meet a threshold: 2.999:1 does not meet 3:1. That is why IBM's Indigo 50 is listed at 4.50:1 with no margin, since its unrounded ratio is only just over 4.5. Any contrast checker that follows WCAG will give the same values, and Paul Tol's published figure of 4.52 for his high-contrast blue against its yellow is the same number this calculation produces.

Why a color blind friendly palette still needs a second cue

WCAG success criterion 1.4.1, Use of Color, says colour must not be the only visual means of conveying information, indicating an action, prompting a response or distinguishing a visual element. W3C's examples of a failure are familiar from any web app: required fields shown in red, errors shown in red, and one person's sales in red and another's in blue. A safe palette makes the colours easier to tell apart, and it still leaves the reader to remember which colour means what. W3C's understanding document accepts a lightness difference of 3:1 or more as an extra visual distinction, with one exception that matters for status colours: when a reader has to identify a particular colour, such as a green outline for valid and a red one for invalid, an additional indicator is needed whatever the ratio. Okabe and Ito make the same point for figures, and call it redundant coding: different line styles, marker shapes and hatching as well as colours, and labels placed on the chart itself, because matching a colour to a key a few centimetres away is hard for colour-blind readers.

Which palette to use for what

For a chart with up to eight categories, the Okabe-Ito palette is the common default, and its authors advise alternating warm and cool colours and putting a clear difference in brightness between two warm or two cool ones. Paul Tol's bright scheme is his own default for lines and labels, with seven colours. His high-contrast scheme is the choice when a chart may be printed in black and white or read by someone with monochrome vision, at the cost of having only three colours. IBM's five colours suit a dashboard with a few series, and its lighter Gold 20 needs a dark outline on a white card. For table cells that highlight black text, Tol says his line colours are too strong and designs a separate pale scheme for that job. Claus Wilke's advice applies to all four: colour-code no more than about eight items in one chart. Past that, label the series directly, split the chart into small multiples, or group similar series under one colour.

Colour blindness types, and what they mean for a website

Okabe and Ito describe the three main types by the cone cell affected. Protanopes have a missing or shifted red-sensitive cone, and see dark red as nearly black, so red text on a dark background is hard for them to read. Deuteranopes have the green-sensitive cone affected. Together these two make up red-green colour blindness, by far the most common kind. Tritanopes, with the blue-sensitive cone affected, are rare: the authors put the frequency at about one in a hundred thousand. Paul Tol adds that the combinations colour-blind readers confuse are less obvious than red against green: yellow against green and purple against blue are the problem pairs in his simulations. On a website the common casualties are the ones W3C lists: a form whose errors are only red, a chart whose legend is only colour, a link set apart from body text only by its hue, and a status badge whose green and red mean ready and blocked.

Testing a palette on the real build

Check the palette where it is used, on the built pages, and not only in the design file. Run each page through a colour vision deficiency simulator and look at it in greyscale. Okabe and Ito warn that a simulation shows the most strongly affected dichromats and is not a true picture of anyone's vision, so use it to find colours that are hard to judge and ask colour-blind colleagues to check the result. Measure text and lines with a contrast checker on the colours in the stylesheet. W3C notes that anti-aliasing can make thin lines render fainter than their declared colour, so a line that passes on paper can still be faint on screen. When a check fails, file it on the page where it happens, with the two colours, the computed ratio and a screenshot. A tester who files from the page with a visual feedback tool gets the url, the browser and the screenshot attached without retyping them, and the developer can see the failing chart rather than read a description of it.

Common questions

Which colors are color blind friendly?

Blue and orange are the pair most guides start from, and the Okabe-Ito palette adds sky blue, bluish green, yellow, vermilion, reddish purple and black. Paul Tol's bright and high-contrast schemes and IBM's five-colour set are the usual alternatives. Whatever the palette, add labels or patterns, because WCAG 1.4.1 rules out colour as the only cue.

What colours should you avoid for colour blindness?

Okabe and Ito name red and green of similar brightness, green and brown, blue and violet, and pale pairs such as sky blue and pink as the combinations red-green colour-blind readers confuse. Paul Tol adds yellow with green and purple with blue. Swap red for vermilion and violet for reddish purple, and vary brightness as well as hue.

What are the different types of colour blindness?

Okabe and Ito describe three by the cone cell affected: protanopia for the red-sensitive cones, deuteranopia for the green-sensitive cones and tritanopia for the blue-sensitive ones. The first two together are red-green colour blindness, the most common kind. Tritanopia is rare, about one in a hundred thousand by their figure, and total colour blindness is rarer still.

Is a color blind friendly palette enough to meet WCAG?

A palette alone meets no success criterion. WCAG 1.4.1 requires a cue besides colour, 1.4.3 asks 4.5:1 for body text, and 1.4.11 asks 3:1 for chart lines, icons and control borders. Several colours in each palette fail on white, including Okabe-Ito orange at 2.25:1 and yellow at 1.32:1, computed with the WCAG formula.

How many colours can a color blind friendly palette have?

Eight is a practical ceiling. The Okabe-Ito palette has eight colours including black, Paul Tol's bright scheme has seven, and his muted scheme nine plus a pale grey for missing data. Claus Wilke advises colour-coding no more than about eight items in one chart. Beyond that, label the series directly or split the chart.

More templates

  • Watercolour of a blank paper luggage tag, its loop of burnt orange string trailing across the paper

    Template

    User story template

    A copyable user story template: the As a, I want, so that sentence, plus context, acceptance criteria, out of scope, dependencies, size and sign-off.

    8 fields, explained ·

  • Watercolour of a small brass hand bell standing upright, its wooden handle washed in burnt orange

    Template

    Release notes template

    A copyable release notes template with a filled-in example: summary, breaking changes, new, improved, fixed, known issues and where to report a problem.

    8 fields, explained ·

  • Watercolour of a small wooden box with a slot in its lid and a folded slip of paper half posted into it

    Template

    Website feedback form

    A copyable website feedback form template: the questions to ask, which two are required, optional contact details with consent, and a filled-in example.

    9 fields, explained ·

Or skip the template and capture the fields automatically.

Environment, console and network attach themselves, on the free plan.

<script src="…/widget.js" data-key="pb_pub_…">