mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-18 00:07:00 +02:00
fix signatures of iter_ helpers
This commit is contained in:
parent
6c382e2627
commit
c9b9ff1519
3 changed files with 56 additions and 47 deletions
|
|
@ -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,)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue