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 #107

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.

kornelski commented 5 months ago

Cool that it works as a pixel without alpha.