kornelski / rust-rgb

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

Add `Rgbw` Pixel #105

Closed ripytide closed 5 months ago

ripytide commented 5 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 5 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 5 months ago

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