this post was submitted on 28 Jan 2024
25 points (100.0% liked)

Rust

5960 readers
2 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

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.

top 5 comments
sorted by: hot top controversial new old
[–] Vorpal@programming.dev 4 points 9 months ago (1 children)

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 6 points 9 months ago (1 children)

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 3 points 9 months ago

Thanks for the clear and detailed explanation!

[–] MoSal@lemm.ee 2 points 9 months ago (1 children)

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

[–] Ogeon@programming.dev 1 points 9 months ago

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