-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert to and from https://github.com/pornel/rust-rgb structs #74
Comments
Hi! Can you elaborate a bit on what you are suggesting? If it is that Palette types should implement conversion to and from rust-rgb, then I would most likely say no, because it would:
Palette could, on the other hand, be extended to support simple conversion from |
Thanks @Ogeon for the quick reply! It seems that rust-rgb is just a "dumb" container (compared to palette which has actual logic going on), and for a bunch of projects I am using rust-rgb as a bridge between different crates (currently doing the trivial conversion in my code), so it would be nice to have a way to do this conversion out of the various crates directly. I don't think the dependency on rust-rgb should be an issue (even if it does change, should be trivial to fix the conversion), anyway if you are uneasy about that, I guess converting from |
I see. Well, |
If you need any support from the rgb crate I'm open to suggestions. |
I think the changes in #81 will make this possible without explicitly depending on it. It should only require a couple of simple conversion calls. With the current design it should just be something like |
81: Make a new system for converting to and from arrays and slices r=Ogeon a=Ogeon This should make some interoperability with other systems better, by making it easier to convert buffers and individual pixels to palette colors. This includes * Bit by bit conversion system for colors. * `Rgb` works with `u8` and other integer types. * `Luma` works with `u8` and other integer types, and can also be non-linear. * Implements `AsRef` to convert colors to raw data. * A slight improvement to the hue types. No need to explicitly call `.into()` when setting a hue. Closes #74
81: Make a new system for converting to and from arrays and slices r=Ogeon a=Ogeon This should make some interoperability with other systems better, by making it easier to convert buffers and individual pixels to palette colors. This includes * Bit by bit conversion system for colors. * `Rgb` works with `u8` and other integer types. * `Luma` works with `u8` and other integer types, and can also be non-linear. * Implements `AsRef` to convert colors to raw data. * A slight improvement to the hue types. No need to explicitly call `.into()` when setting a hue. Closes #74
No description provided.
The text was updated successfully, but these errors were encountered: