Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colorblindness simulator to colourPicker #55

Open
psyguy opened this issue Dec 25, 2022 · 3 comments
Open

Add colorblindness simulator to colourPicker #55

psyguy opened this issue Dec 25, 2022 · 3 comments

Comments

@psyguy
Copy link

psyguy commented Dec 25, 2022

Hi,

Thanks for the great package – it spares me the time it takes to constantly look up R native colors and compare them with trial and error!

One thing that I see missing is a color vision deficiency simulator (like @clairemcwhite and @clauswilke's colorblindr package). Currently, I save my chosen color palette in a png file and use online tools (like this) to check whether my palette is print- and colorblind-friendly.

It would be great if you could add (three) more rows underneath the selected colors that would show how it is seen by people with protanomaly (2% of males), deuteranomaly (6% of males), tritanomaly, and desaturated (that would simulate grayscale printing) vision deficiency. Here's what I mean (poorly made in Paint 😄):

image

In case it feels like too much information overload and only one should be chosen, I believe the desaturated one (grayscale) is the most relevant since it is black-and-white print-safe and also safe for all other types of color vision deficiencies.

@daattali
Copy link
Owner

Thanks for the defailed description! My initial reaction was that this is out of scope for this package. I can appreciate the issue this is solving, but this tool is meant to serve one specific purpose, which is only to select colours, not to simulate them for different people. But I do see the benefit of this feature so I'll leave the issue open and will be happy to accept a PR if someone wants to tackle it.

I think rather than adding 3 rows which will be a UI nightmare, perhaps there can be a dropdown where the user can select what to display: "Real colour" or "Tritanope" or "Deuteranope" etc

@clauswilke
Copy link

Just FYI, if you're willing to live with a colorspace dependency, the simulation part is a single function call. You just stick your colors into the relevant function and get the cvd-simulated colors in return: https://colorspace.r-forge.r-project.org/reference/simulate_cvd.html

@daattali
Copy link
Owner

Thanks, {colorspace} has very minimal dependencies so I would be happy to use it!

The other part of this feature is coming up with a clear, clean, user friendly UI, and then of course implementing it cleanly and testing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants