-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pyreverse
: use colorblind friendly default colors
#8415
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
pyreverse
: use colorblind friendly default colors
#8415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not review the graphical result... Code's LGTM 😄
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8415 +/- ##
==========================================
+ Coverage 95.68% 95.73% +0.04%
==========================================
Files 175 174 -1
Lines 18465 18392 -73
==========================================
- Hits 17668 17607 -61
+ Misses 797 785 -12
|
It looks fine with protanopia (no red) but it's a little hard with other form of colorblindness. No blue: orange 2 and goldenrod 9 are not great in particular. This is not something that can be improvised. What were the color before that (maybe it's already taken into account by plantuml) ? Otherwise some research are in order I think :D |
This comment has been minimized.
This comment has been minimized.
Oh that's cool, what tool did you use to make the different versions? Or did you just desaturate it yourself? I tried to adapt the colorblind palette from seaborn with the closest matching HTML colors. |
It's firefox dev tools for accessibility (ctrl + shift + I), but there's probably the same thing in chrome. If it's already a colorblind palette then I don't think we're going to do much better than that, this is a hard problem to solve. They probably made the better result for red color blind because it's the most prevalent, it can't be perfect. |
I am actually colorblind and these colours are indeed sub-optimal. Funilly enough the "no green" output Pierre gives works really well for my type of colour blindness but I don't know if it would work for others. |
I've found three possible color palettes: What's the best one in your opinion @DanielNoord ? Also do you know what type of color blindness you have ? It seems we should target red/green rather than blue/yellow, because red/green is a lot more common. |
I have red/green, the second link works quite well for me! |
All figures in the second one, or a particular one ? :) |
All are quite good, but figure 1 is definitely the best! |
I think we should use figure 7 then, there's 9 different values and the contrast with the black text is still high enough (compared to say the dark blue in figure 4 where there is more values but I can't read the value in it personally). Let me know if you want me to translate that in plantuml color @DudeNr33 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Colorblindness to take into account)
Thank you both for your input and research! The developer tools option is extremely helpful, and having feedback from Daniel as well! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing we even got an enhancement for hexcode !
pylint/pyreverse/main.py
Outdated
"#EEDD88", # light yellow | ||
"#EE8866", # orange | ||
"#FFAABB", # pink | ||
"#DDDDDD", # pale greay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"#DDDDDD", # pale greay | |
"#DDDDDD", # pale grey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsie
"gold", | ||
"hotpink", | ||
"mediumspringgreen", | ||
"#77AADD", # light blue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"#77AADD", # light blue | |
# colorblind friendly palette taken from... (sorry I'm on mobile) | |
"#77AADD", # light blue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it definitely makes sense to not only put the link in the news fragment, thanks for the catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
pyreverse
: replace default colorspyreverse
: use colorblind friendly default colors
This comment has been minimized.
This comment has been minimized.
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 347c76a |
I just saw the new colors -- they look great! 🎨 |
Type of Changes
Description
As discussed in the issue, with 3.0 we can now change the default color palette.
Closes #8251