-
Is there a way to cycle through the named colors? I would argue a crate called palette should provide such functionality. Probably with different palettes preset (SVG, terminal..). My use case: I like to upload such palettes to the gpu. Did I miss something in the docs? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! There's currently nothing implemented for it but it wouldn't be difficult to have a constant slice with all of them. Either with or without the names. Or both. As for having other palettes, I would like to avoid having a curated palette collection (despite the crate's name 😅). That's better as an external resource or different crate. The SVG colors were added long ago because they are fairly ubiquitous and standardized, so they work a bit like a |
Beta Was this translation helpful? Give feedback.
It's really just a matter of staying focused on the color math. 🙂 It's not so much about what gets compiled into the program, even though it's more for the compiler to process, but more about maintenance and purpose.
Regarding maintenance, it would be more to test, organize and take into account when doing changes. In this case it would mostly be a matter of curating the collection, since an array of colors usually doesn't cause much issues once it's added. Unless something like
phf
, that's used for the string lookup, suddenly breaks compatibility. 😅The reason is more about purpose. This crate's main purpose is color math and I don't want to widen that scope too much. If something ends u…