-
Try to convert from the hsl colorspace to the rgb colorspace and don't get the cargo play script
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It looks to me like it's just a matter of using different scales (there are multiple conventions). The ranges of RGB, saturation and lightness is 0.0 to 1.0 when using You can check the documentation for the ranges of each color space. |
Beta Was this translation helpful? Give feedback.
It looks to me like it's just a matter of using different scales (there are multiple conventions). The ranges of RGB, saturation and lightness is 0.0 to 1.0 when using
f32
andf64
. So if I'm reading this correctly, saturation should be 1.0, lightness should be 0.5 and the expected RGB values either changed from 255.0 to 1.0 or converted tou8
with some variant ofrgb.into_format::<u8>()
.You can check the documentation for the ranges of each color space.