Works on this device
Color Blindness Simulator
Open a picture or a screenshot from your device, or type your colours, and see how they may look to people with the three main types of colour blindness. The picture is changed by your browser on your device. This page does not upload it.
Your picture
PNG, JPEG, WebP, GIF, BMP or AVIF, up to 50 MB and 8,192 pixels on a side. Your browser opens and changes the picture on your device. This page does not upload it.
Below 100%, the simulation is mixed with normal vision: a rough idea of a milder form.
Ready. Open a picture or choose Try an example.
How it may look
Your picture and the simulated picture will show here, side by side.
- Size of the picture
- Simulation
- Strength
Your colours
Hex such as #3366cc or 3366cc, rgb(51, 102, 204), hsl(220, 60%, 50%), three numbers from 0 to 255, or a CSS colour name. Up to 24 colours.
The same mix as for the picture. At 100% the table shows the three types of dichromacy.
How to use the simulator
- Choose Open a picture and pick a PNG, JPEG, WebP, GIF, BMP or AVIF file from your device, or choose Try an example. A screenshot of a web page, a chart or an app works too.
- Choose the Type of colour vision: protanopia, deuteranopia or tritanopia.
- Leave Strength at 100% to see the picture as a person who has no cones of that type may see it. Choose a lower value for a rough idea of a milder form.
- Compare your picture with the simulated picture. Choose Download the PNG to save the simulated picture.
- To check the colours of a design, type them under Your colours, one on each line. The table shows each colour as it may look with each type. Choose Download CSV or Copy the table to keep the codes.
Your picture stays on your device
Your browser opens the picture and changes it on your device. This page does not upload it and does not keep it: when you close or reload the page, it is gone. The PNG you download is also made by your browser.
The types of colour blindness
- The eye has three types of cones. L cones respond most to long (red) light, M cones to middle (green) light and S cones to short (blue) light.
- Protanopia: the L cones do not work. Red and green are hard to tell apart, and reds look darker.
- Deuteranopia: the M cones do not work. Red and green are hard to tell apart.
- Tritanopia: the S cones do not work. Blue and green, and yellow and violet, can be hard to tell apart. This type is rare.
- Protanomaly, deuteranomaly and tritanomaly are milder forms: all three cone types work, but one of them responds differently. A strength below 100% gives only a rough idea of them (see the method).
How the simulation is worked out
The page uses the method of Viénot, Brettel and Mollon (1999) for people with two working cone types (dichromats). Each step is worked out in your browser:
- Each 8-bit value of red, green and blue is turned into linear light with the sRGB curve (IEC 61966-2-1), then into CIE XYZ with the sRGB matrix of the same standard (its primaries and the D65 white).
- XYZ is turned into the responses of the three cone types with the cone fundamentals of Smith and Pokorny (1975): L = 0.15514 X + 0.54312 Y − 0.03286 Z, M = −0.15514 X + 0.45684 Y + 0.03286 Z and S = 0.01608 Z.
- The response of the missing cone type is replaced, so that every colour lands on one flat surface (a plane) of colours that look the same to the dichromat and to normal vision. For protanopia and deuteranopia it is the plane through black, white and the sRGB blue, which also holds yellow. For tritanopia it is the plane through black, white and the sRGB red, which also holds cyan. Viénot and his colleagues did not give a plane for tritanopia; this choice is the one the libDaltonLens library describes.
- The result goes back to linear RGB and then to sRGB. A value below 0 or above 1 is cut to 0 or 1, and each value is rounded to a whole number from 0 to 255 (a half goes up).
- With a Strength below 100%, the simulated colour is mixed with the original in linear light: result = strength × simulated colour + (1 − strength) × original colour.
| Type and new value | From R | From G | From B |
|---|---|---|---|
| Protanopia: R and G | 0.10887 | 0.89113 | 0.00000 |
| Protanopia: B | 0.00447 | −0.00447 | 1.00000 |
| Deuteranopia: R and G | 0.29027 | 0.70973 | 0.00000 |
| Deuteranopia: B | −0.02197 | 0.02197 | 1.00000 |
| Tritanopia: R | 1.00000 | 0.15242 | −0.15242 |
| Tritanopia: G and B | 0.00000 | 0.86715 | 0.13285 |
The table above shows the three matrices that the page works out from these numbers when it opens. They are not typed in from a table. The page uses them with all their digits; the table rounds them to 5 decimal places. R, G and B are linear light from 0 to 1, and each row gives one new value: for protanopia, new R = 0.10887 × R + 0.89113 × G.
The milder forms are not modelled. The strength mix is a simple stand-in that keeps the method above. The model of Machado, Oliveira and Fernandes (2009) changes the cone curves themselves; its matrices come from tables of measured data, so this page does not use it.
Worked example
Pure red, #ff0000, is 1, 0, 0 in linear light. For protanopia the new values are 0.10887 × 1 = 0.10887 for red and green, and 0.00447 for blue. On the sRGB curve that is 93, 93 and 14 out of 255, so the colour is #5d5d0e, a dark olive. For deuteranopia the same red becomes #939300: its blue value, −0.02197, is cut to 0.
Type #cc3333 (a red) and #33aa33 (a green) under Your colours. With deuteranopia they become #7b7b27 and #949439: two olive colours that differ only a little in lightness. With tritanopia the red does not change and the green becomes #54a0a0.
Make your design work for everyone
- Do not use colour alone to show meaning. WCAG 2.2 success criterion 1.4.1 (Use of Color, level A) asks for a second sign as well, such as a word, a pattern, a shape or an icon.
- Check the contrast between text and its background with the Color Contrast Checker. This page does not check contrast.
- To see a live web page in this way, some browsers have a setting in their developer tools. In Chrome it is Emulate vision deficiencies in the Rendering panel. This page works on pictures, so you can also check a screenshot here.
Limits you should know
- These are simulations of average dichromat vision. People with colour vision deficiency see differently from one another, and many have a milder form.
- What you see depends on your screen, its settings and the light in the room. The colours of the picture are treated as sRGB.
- This is not a test of colour vision and not a diagnosis. An eye doctor or an optometrist can test colour vision.
- Pictures of up to 50 MB, 8,192 pixels on a side and 16,777,216 pixels in all. A large picture can take a few seconds and much memory. Most browsers cannot open TIFF or HEIC files: save them as PNG or JPEG first.
- See-through parts of a picture keep their opacity. The saved PNG has 8 bits for each colour value and does not keep the extra data of the original file, such as camera data or a colour profile.
- Up to 24 colours in the list. A colour outside sRGB (possible with lab(), lch(), oklab() and oklch()) has each of its red, green and blue values cut to the range 0 to 255 first, and the table says so.