[fixed] Improve contrast for ES-generated heatmaps with solid background when using dark themes

Currently, the “Use solid background color instead of gradient in heatmaps” option uses black text on top of a non-opaque background. This works great for light themes, but the contrast is significantly reduced when using dark ones.

Browsing scripts around the site, I noticed that in those conditions the contrast ratio of the black text on top of the semi-transparent background fails basic contrast checks for small text, hovering around a ratio of 2.78~3.04 to 1 (a ratio of least 4.5:1 would be ideal).

Either increasing the opacity of the background or inverting the text from black to white would solve this issue on dark themes.

1 Like

Go into your preferences:

I think you misunderstood what I’m trying to say…

I should make a disclaimer: I don’t partake in using the automatically generated heatmaps, so it doesn’t affect me specifically - my job is one where user accessibility is something I think about a lot, so I’m just trying to point it out.

Currently, both the gradient and solid background options have poor visual accessibility. I didn’t mention the gradient one since it was already discussed multiple times in the past and the contrary feedback was always dismissed or ignored, so I don’t believe the sentiment would change now.

My hope, instead, was to suggest an easy change that would improve the legibility of the solid background option so that we have at least one option with good accessibility.

Can you show a screenshot that shows what you mean?
On my side things seem to have good visibility.

Is your concern color blindness?

My concern is contrast. While hovering around 3.0 is not terrible, it’s also not ideal. Here are a few examples:

2.9:1 ratio

2.78:1 ratio
image

3.04:1 ratio
image

I cannot disagree with you. On my monitor they’re fine for me, but I also know my monitor is big and has very good contrast overall - that’s why I like to check the actual contrast ratios since they provide a more concrete number we can play around.

Of course, trusting contrast ratios blindly isn’t the best, but it’s usually a good baseline to find a minimum value.

I’m only really suggesting a change because it’s such a small one

@Dimava
May be worth implementing for clarity on more monitors?

I have everything in config just need some tweaking for default values
What should I change?


NVM I see it’s broken

fixed, see test site
wait I forgitsomething gimme a minute
done
I think it works

The uploaded version sets merging on by default, change site settings if needed

@Splime @Rose does it look fine or I should was it out a bit?

1 Like

Aaaand it’s out

Personally I think I would prefer dark solid background with white text, but this solution does provide contrast and is decent for visual clarity.
Or like, just dark solid background and black text with white outlines like the text in the gradient option.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.