Skip to content

Commit bcd5318

Browse files
mockersfcart
andcommitted
color spaces and representation (#1572)
`Color` can now be from different color spaces or representation: - sRGB - linear RGB - HSL This fixes #1193 by allowing the creation of const colors of all types, and writing it to the linear RGB color space for rendering. I went with an enum after trying with two different types (`Color` and `LinearColor`) to be able to use the different variants in all place where a `Color` is expected. I also added the HLS representation because: - I like it - it's useful for some case, see example `contributors`: I can just change the saturation and lightness while keeping the hue of the color - I think adding another variant not using `red`, `green`, `blue` makes it clearer there are differences Co-authored-by: Carter Anderson <[email protected]>
1 parent ab0165d commit bcd5318

File tree

7 files changed

+1118
-404
lines changed

7 files changed

+1118
-404
lines changed

0 commit comments

Comments
 (0)