Palette 0.7.4 released: alloc feature, more color comparison traits, and some more (ogeon.github.io)
from Ogeon@programming.dev to rust@programming.dev on 28 Jan 2024 13:07
https://programming.dev/post/9231634

Hey, folks! Here’s another update for Palette, the color crate I’m maintaining. Feel free to let me know if you have any questions or feedback! I will do my best to answer.

#rust

threaded - newest

Vorpal@programming.dev on 28 Jan 2024 21:53 next collapse

Looks cool. Absolutely not my area of knowledge let alone expertise. But I thought digital colour stuff was all about ICC profiles (that basically describe how wrong a device handles colour and how to correct for it).

I don’t see any mention of ICC profiles in the docs though? Or is this the lower building block which you would use to work with data from ICC profiles? Basically I think I’m asking: who would use this crate and for what? Image viewers/editors?

Ogeon@programming.dev on 28 Jan 2024 23:35 collapse

ICC profiles are definitely part of the field, but that’s sort of a topic of its own. At least in terms of scope. The color space rabbit hole is so deep that I never got as far as including them. There are other crates that go into those parts and it should be easy to bridge between them and Palette.

I would say Palette is more for the “business logic” of working with colors, so converting, manipulating and analyzing. The difference from ICC profiles when converting with Palette is that you need to know more about the source and destination color spaces during compile time. ICC profiles use more runtime information.

Palette could be used for applications like image manipulation programs, 3D rendering, generative art, UI color theme generation, computer vision, and a lot more. A lot of people also use it for smaller tasks like converting HSL input to RGB output or making gradients.

Vorpal@programming.dev on 28 Jan 2024 23:47 collapse

Thanks for the clear and detailed explanation!

MoSal@lemm.ee on 29 Jan 2024 11:49 collapse

Thank you for working on this. I found Okhsl to be of great utility.

Ogeon@programming.dev on 29 Jan 2024 18:21 collapse

That’s nice to hear! And the Ok* color spaces are indeed quite neat