Function hsl_to_rgb
pub fn hsl_to_rgb(h: f32, s: f32, l: f32) -> AlphaColor<Srgb>Expand description
HSL → opaque sRGB. h in degrees (any range; wrapped), s and l in
[0, 1].
use tilo_ui::color::hsl_to_rgb;
use tilo_ui::vello::peniko::Color;
assert_eq!(hsl_to_rgb(120.0, 1.0, 0.5), Color::from_rgb8(0, 255, 0));