Color Contrast Analyzer

Color contrast is a key accessibility issue, and with the upcoming Department of Justice Rule requiring compliance by April 24, 2026, I started to analyze color palettes for websites I administer. I found that there were plenty of options for analyzing color contrast ratios between two colors, but I had several large color palettes that I needed to analyze quickly. I wanted a summary of what I could use so I could take action and share results with my coworkers.

I started making a tool that would take several colors and analyze all combinations and report all results. I then made the summary report of just the combinations that pass WCAG standards.

This turned into https://contrast.jefftml.com, which analyzes the color contrast between up to 50 different colors in almost every color code format.

There are a few things my color contrast analyzer does that goes beyond what other tools do, and beyond what the WCAG outlines.

The first differentiator is the summary of valid combinations. This table makes it easy to know what you can use and have it meet different levels of accessibility standards. It is a great tool to review what you are currently using to validate you are not using invalid combinations, but also gives a great starting point if you are creating new content with a new or existing color palette.

The second differentiator is that I calculate color mixing for colors with alpha or transparency values. The best example I use when discussing this is thinking about black text on a white background. If the black text is fully opaque (not transparent) then you can definitely see the text just fine. If the text is 1% opaque (99% transparent) then you can imagine the text would be very difficult to read. Most tools ignore or do not support transparency, but my color contrast analyzer supports this and accurately calculates the contrast of the mixed colors. This only works for transparent foreground colors as transparent backgrounds have an unknown color behind them, but mixing more than two colors together gets complicated quickly both on the user experience and the calculation side of things.

This was a fun and rewarding project to work on, and I use it all the time to double check my work quickly and download reports.

Posted on: February 21, 2025