kornelski / rust-rgb

struct RGB for sharing pixels between crates
https://lib.rs/rgb
MIT License
97 stars 19 forks source link

Add `Rgbw` Pixel #105

Closed ripytide closed 2 months ago

ripytide commented 2 months ago

Fixes #21

One concern I have when implementing the Rgbw pixel type is what From<> implementations to add since converting to Rgb and Bgr seems possible but could be lossy since the white component would be lost which could change the color quite drastically whereas all the other current From conversions simply change the memory layout of the same components.

For this reason I have not added any From conversions with the existing pixel types.

ripytide commented 2 months ago

Closing temporarily in favor of #106 since I'd rather rebase this change onto that PR than the other way round as that ones huge lol.

ripytide commented 2 months ago

I've opened #107 since github won't let me re-open this one after a force-push :(