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

Closed ripytide closed 1 month 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.

kornelski commented 1 month ago

Cool that it works as a pixel without alpha.