SamSaffron / flamegraph

Flamegraph profiling support for Ruby 2.0
MIT License
382 stars 36 forks source link

Colorblind-friendly color schemes #31

Open nateberkopec opened 5 years ago

nateberkopec commented 5 years ago

https://github.com/SamSaffron/flamegraph/blob/master/lib/flamegraph/flamegraph.html#L367

I would need to do more research but I imagine a) avoiding certain combinations of red/green, etc and b) adding some brightness variations, texture variations could help.

Ideally I think you would use this in RMP like http://localhost:3000/?pp=flamegraph&colorblind=deut or &colorblind=prot, etc

from Justin Weiss: https://t.co/ac6mty2Nxz

SamSaffron commented 5 years ago

Sure ... I support this change! By default we should have a color blind friendly theme imo.

nateberkopec commented 5 years ago

Google claims their new color scheme is usable by 99.997% of the population: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html

Example implementations included.

nateberkopec commented 5 years ago

and here's a JS implementation by Mike Bostock of D3 fame: https://observablehq.com/@mbostock/turbo