fix signatures of iter_ helpers

This commit is contained in:
i do not exist 2026-04-17 04:07:14 +03:00
parent 6c382e2627
commit c9b9ff1519
3 changed files with 56 additions and 47 deletions

View file

@ -11,6 +11,10 @@ pub fn rgb (r: u8, g: u8, b: u8) -> ItemColor {
ItemColor { okhsl: rgb_to_okhsl(term), term }
}
pub fn g (g: u8) -> Color {
Color::Rgb(g, g, g)
}
pub fn okhsl_to_rgb (color: Okhsl<f32>) -> Color {
let Srgb { red, green, blue, .. }: Srgb<f32> = Srgb::from_color_unclamped(color);
Color::Rgb((red * 255.0) as u8, (green * 255.0) as u8, (blue * 255.0) as u8,)