[FEATURE] Make palettes return Color
See original GitHub issueI was a bit surprised to find that the colors returned by viridis()
(and other palettes) are simple Hex str
s, not instances of Color
. I had expected that I can call darken
and lighten
on the generated values, but unfortunately that seems not to be the case.
Additionally, I cannot seem to find a way to generate a Color
instance out of the hex strings, as there is no from_css
, from_hex
or similar method. The only way seems to be to split the str
manually, convert the numbers from hex to decimal, and then create a RGB
object from that.
What I would like to have is that the palettes return Color
instances, so that I can use the full range of methods on them.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Setting up Color Palettes in R
In this post we'll look at some ways you can define new color palettes for plotting in R. To begin, let's use the...
Read more >How to Make a Custom Color Palette and Swatch ... - YouTube
Learn how to save a color swatch and custom color palette from a photo in Photoshop. Essential skills you will learn:- How to...
Read more >Make Hundreds of Color Palettes from 1 COLOR! - YouTube
Adobe Photoshop CC 2020 tutorial. What is the best way to build color palettes in Adobe Photoshop 2020? How do you combine colors...
Read more >Easy Way To Expand Color Palettes in R - Datanovia
This article describes how to use the colorRampPalette() R function to expand color palettes. We'll provide practical example with ggplot2.
Read more >Selecting Colors with the Palette API - Android Developers
To access all colors in a palette, the getSwatches() method returns a list of all swatches generated from an image, including the standard...
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
Unfortunately, I haven’t found the time, and have since then also migrated away from Bokeh. So if someone still wants to do this, feel free. If not, you can also close this ticket.
Thanks for your help and Bokeh!
Absent other input I will close for now