-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Add Universal Color Design categorical palette #27757
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
Comments
The term "palette" does not actually map to any specific feature in our API. The closest ideas are:
If you are seeking to change the default color cycle, there is extensive conversation on the topic in #9460. If you would simply like to add one (or more, but keep it relatively small, I'd say) entry into the In general there is a bit of a balancing act here as one of the things that generally makes it easier to differentiate regardless of color perception differences is changes in lightness... however in a color cycle we tend to not want to emphasize any particular values in the cycle and thus having them be the same lightness is desirable, so you only really get to play with hue if you want perceptual uniformity... And then you have to balance having enough colors with having colors that are differentiable. (and different hues have different perceptual lightness with different forms of colorblindness) |
Yeah this is part of why the seaborn Always a lot of tradeoffs in data visualization, especially when it come to color! |
Oh no, I certainly am not asking to change the default colour cycle. You all know a lot more than me so sounds like I should just close this as it maybe doesn't suit being in as a colour map option as there is already a lot and the different hues might not be universal enough. Happy to just leave it as is and leave this closed issue as a reference for anyone else searching for this colourmap |
IMO this is still worthy of an addition as a qualitative color map in matplotlib! |
Okay, well @ksunden do you think it's worthwhile attempting to add this? What is the process for doing that? |
Your best bet is opening a PR adding the new colormap - generally our current criteria for new ones are:
|
Is this the place to add it? https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/_cm.py |
I did find it a bit weird that the page is on a repository about flies, and not some kind of human research page. They do mention creating a "Color Universal Design Organization" (CUDO), but unfortunately, the link is 404. The site does appear to be working, but is almost entirely in Japanese, so I cannot be 100% sure. We did some looking yesterday, and best we could find was this page, but unfortunately, all the images are dead. We also found a page on the DIC Global website, which appears to be a pigment/paint/chemical manufacturer. In the section titled The Color Universal Design–Recommended Color Set, there appears to be a third edition of the colours. At the end of that section, there is a link to the guidebook in PDF format which appears to contain a fourth edition. There is more guidance in there for 4/5/6 palettes, and also a pastel-looking version. However, my Japanese is otherwise non-existent, so it would be best to get someone fluent to translate it (the PDF is composed of images, so I cannot copy&paste into translation software.) If we were to add this, it would be best to use the most current edition, but someone does need to untangle what that is (e.g., I don't know if DIC Global is definitive or just their interpretation for their own use.) |
Interesting. I assume you saw this also? https://jfly.uni-koeln.de/color/ - this is where I got the colourmap for the github repo I linked at the top (https://github.com/mbhall88/cud) |
I'm still confused if you are trying to make a colormap, or a color sequence. As noted by @ksunden, we don't have a "palette" concept. We have colormaps, which are defined in We also have a Finally, we have style sheets that support a sequence of colors. I guess that is the eventual plan for |
I did; that's the article on the repository about flies. It's also dated 2002/2008, while the others are 2013/2018. |
Okay, clearly my understanding is pretty low here as I don't really understand the difference between a palette and a colourmap etc. Again, I think I'll just close this and leave it here as a reference for anyone else. Given there is already tableau_10_colorblind that should be more than sufficient |
Problem
Hi,
I think the Color Universal Design colorblind-friendly palette would be a great addition to matplotlib.
As mentioned in mwaskom/seaborn#3631 this would make sense to add as a categorical colourmap to matplotlib.
Proposed solution
I have created a repository with some examples of the palette you can take a look at: https://github.com/mbhall88/cud
The text was updated successfully, but these errors were encountered: