brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Firefox's Accessibility panel can simulate color blindness on your page

Web development
~/tips/tip-firefox-simulate-color-vision

Accessibility tab > Simulate

See your design the way someone with colour vision deficiency might.

A chart that uses red and green to mean bad and good looks obvious to me and may be two shades of mud to someone else. Firefox can preview that in a few clicks.

Open DevTools and go to:

Accessibility tab > Simulate

Pick one of the options:

Protanopia (no red)
Deuteranopia (no green)
Tritanopia (no blue)
Achromatopsia (no color)
Contrast loss

The page repaints with that filter. Scroll through your status badges, charts, form errors and links. Anything that only differed by colour now stands out as a problem, because it no longer stands out at all. Add a label, an icon or an underline and check again.

I would start with deuteranopia on any page that uses green ticks and red crosses. Achromatopsia is a blunt but useful test: if the page makes sense in grey, you are in decent shape.

Choose None to switch it off, or you will wonder later why the site looks odd. A simulation is an approximation, and it says nothing about screen readers or keyboard use, so treat it as one check among several.

Further reading: Firefox DevTools: color vision simulation

More Web development tips node --inspect-brk app.js Clear site data for one site from Chrome DevTools user.id === 42 $x(path [, startNode]) CSS Overview in Chrome DevTools audits the colors and fonts of a page All Web development tips (159) All topics

Link