bheisler / cargo-criterion

Cargo extension for running Criterion.rs benchmarks
Apache License 2.0
184 stars 23 forks source link

Colorblindness Accessibility #11

Open bheisler opened 4 years ago

bheisler commented 4 years ago

Several users have commented that they find it difficult to tell apart the different colors used by the plots, especially in the line chart. I've already made the colors configurable, but that alone might not be enough.

Also, there are only about ~8 colors by default in cargo-criterion's set, so if there are more than 8 functions in a group it would be impossible for even people who aren't colorblind to tell them apart.

I'm not sure what to do to improve on this, but it is a known problem.

inferiorhumanorgans commented 2 years ago

Have you seen Color Brewer? Some of their schemes are colorblind and/or photocopier friendly and some offer up to twelve different colors.

https://colorbrewer2.org/

bheisler commented 2 years ago

Good to know, thanks! Unless I'm missing something, their colorblind-friendly color schemes only go up to four different colors.

Probably the only workable solution would be different dashing patterns or textures rather than colors.

inferiorhumanorgans commented 2 years ago

The single hue schemes (blues, greens, greys, oranges, purples, reds) should be colorblind friendly and they go up to 9 different shades. Color Brewer isn't necessarily the prettiest but it is one of the most comprehensive solutions to coming up with usable color schemes.

Were it up to me: schemes (colors + patterns) would be configurable with some set of defaults included (using either Colorbrewer and maybe the d3.js continuous color scheme bits). Needing more than 9 colorblind friendly classes at a time seems like a fairly niche use case that could be handled by allowing colors + patterns to be defined in the config file.