Thunderbird add-on to warn if text is invisible (in dark or light mode)

A few years ago, we could reasonably assume that an email we write will be displayed as a black text on a white background. But today, the dark mode (or, dark theme) is available in pretty much all applications, including e-mail clients. Also in Thunderbird.

I recently emailed a few people and formatted the text in that email to use a white font. Everything looked fine on my side (I use a dark mode), but the recipients used Outlook with a white background and couldn’t see part of the email! This led to unnecessary confusion.

Add-on to warn about invisible text

Today, I created a small add-on as a proof-of-concept to warn me if I make a similar mistake in the future.

Presently, it’s literally just a few lines of code. It contains a simple heuristic to detect if we hard-coded white or black font, and warn about it. This is how it looks in action:

An email composed on a system with dark mode on. At first glance, everything looks fine here. But take a look at the next screenshot to see why the add-on displayed the warning.
When we switch to light mode, we can see that part of the text is invisible. And this is how recipients might see it if we don’t reset font color to the defaults.

How to use this add-on?

I published the Thunderbird Font Color Validator add-on on GitHub. If you want to try it, check the Releases section. You can find a zip file there which can be installed in Thunderbird. Since it’s just an experiment, I didn’t bother to publish it to the add-on catalog at this point.

If you found this page and find this add-on idea useful, please star the repo or leave a comment to leave me a hint that it’s worth a bit more of attention.

Happy emailing!

Leave a Comment