Alpha values of RGBA color tuples are ignored
See original GitHub issueThank you very much for providing this awesome library. Unfortunately, I found a bug concerning the handling of the transparency values in RGBA colour tuples. The alpha value is simply being ignored, as
print(sns.color_palette([(1,1,1,0)]))
only results in the following output:
[(1.0, 1.0, 1.0)]
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Convert RGBA tuple to hex with matplotlib - Stack Overflow
This is how I would do it: convert the RBG/HEX color to HSL, then modify L (the lightness) and finally bring it back...
Read more >Premultiplied Alpha - Nigel Tao
NPA (Non-Premultiplied Alpha), also known as unassociated alpha or straight alpha, assumes that the RGB values are independent of the A value. A ......
Read more >Specifying Colors — Matplotlib 3.1.0 documentation
Matplotlib recognizes the following formats to specify a color: an RGB or RGBA (red, green, blue, alpha) tuple of float values in [0, ......
Read more >Alpha compositing - Wikipedia
RGBA tuples, a pixel value of (0, 0.7, 0, 0.5) implies a pixel that has 70% of the maximum green intensity and 50%...
Read more >How do you set the alpha of a color??? - Python Forum
Pygame draw rect does not use alpha. It will accept the color values. But it will always ignore alpha. You can also darken...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much for your reply. I would still prefer to be able to set the alpha value myself. Otherwise, I wouldn’t, for example, be able to create a scatterplot with varying degrees of transparency for different categories.
Related to that, it would maybe be a good idea to change the following line of code: https://github.com/mwaskom/seaborn/blob/88479dc3a9c5dee00fa697fda73152add0827fc4/seaborn/relational.py#L937 to allow for setting the alpha value in relation to the hue value. What’s your opinion on that?
I subscribe also to this feature request.
It is something that is missing in the current seaborn package