How to visualize colors? #295
-
I want to visualize color interpolation similarly to how it is shown in the docs here How to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
As ColorAide is mainly meant for practical applications of colors, I don't ship such tools with the library. They are more documentation and development, with that said, the tools are all available in the repo. While the library is rigorously tested, the tools are not, just an FYI. So, they can break on occasion without me knowing. The tool that generates these is called Here we specify 3 Oklab colors and specify that we want to use the
This can be a bit restrictive, so we do have 3D interpolation diagrams as well. As long as the color space is restricted to 3 color components, you can show them . This one is a bit easier to use as you don't have to specify slice bounds, just the color space and the colors and the output (display) space to view it in.
|
Beta Was this translation helpful? Give feedback.
-
Thanks, this is extremely helpful. I ended up using the 3d version and got this nice plot: |
Beta Was this translation helpful? Give feedback.
As ColorAide is mainly meant for practical applications of colors, I don't ship such tools with the library. They are more documentation and development, with that said, the tools are all available in the repo. While the library is rigorously tested, the tools are not, just an FYI. So, they can break on occasion without me knowing.
The tool that generates these is called
tools/interp_diagram.py
. It's built on top of thetools/slice_diagram.py
tool. Basically, you give it a list of colors and define the slice. If the colors do not fall on the slice plane, they will be adjusted such that they do. You need the tool requirements installed: https://github.com/facelessuser/coloraide/blob/main/r…