jonhoo/inferno

Differential color map does not work well for color-blind people

itamarst opened this issue · 4 comments

The differential color map goes red to green. Unfortunately, the most common form of color blindness is green/red blindness ("up to 8% of males and 0.5% of females of Northern European descent" per https://web.archive.org/web/20160728003639/https://nei.nih.gov/health/color_blindness/facts_about).

I would suggest switching to red/blue, and perhaps toning the saturation down a little so the text is easier to read with a red background.

I'd be happy to do this at some point, since I'm planning on using the differential mode.

Ah, yes, a color-blind friendly variant of differential seems like a great idea! Red/gree was chosen purely to replicate what the upstream flamegraph project does, but providing an alternative would be good.

The differential flamegraphs should already be using red/blue, not red/green. However, if the current color scheme is an issue for people with color blindness, it would be great to find something that works better.

@jasonrhansen oh I misread that, the comment (https://github.com/jonhoo/inferno/blob/master/src/flamegraph/color/mod.rs#L364) still says green but the actual code is blue. I guess I'll close this, and maybe fix that comment if I end up touching the function in PR I'm working on (I want to change the neutral color to be less jarring, at a minimum).

@itamarst You're right, the comment is incorrect.