Menu

1 / 5

A map that doesn't need colour: our embed in Windows forced-colors mode

DEV Community: css·Regime Map Team·11 days ago
#4Ib6cFdC
#devtocss#devto#dev#rmefc#forced
Reading 0:00
15s threshold

We're the team behind Regime Map, a country-by-country register of gambling regulation. Our embeddable map colours each country by its regulatory status. A few days ago we wrote about making that embed survive any host page . Under that post, a reader asked something we hadn't tested: what happens to the map in Windows forced-colors mode?

The honest answer was that it broke. This post is how we fixed it.

What a contrast theme does to a map

In a Windows contrast theme the browser repaints every page with a small palette of about eight system colours: one for the background, one for text, one for links, one for buttons, and so on. For text, that is exactly what a reader with low vision or light sensitivity wants.

Our map has six statuses, each with its own fill: licensed regime, state monopoly, varies by region, prohibited, no licensing regime and not assessed, plus "not covered yet" for countries we haven't checked.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.