Skip to content

Commit

Permalink
corrected f32 to u8 color casting
Browse files Browse the repository at this point in the history
  • Loading branch information
DavJCosby committed Nov 11, 2024
1 parent 3a08436 commit c8d7b78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/resources/tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ fn draw_led(ctx: &mut Context, led: &(Srgb, Vec2)) {
y: pos.y as f64,
radius: 0.0,
color: Color::Rgb(
(col.red / 255.0) as u8,
(col.green / 255.0) as u8,
(col.blue / 255.0) as u8,
(col.red * 255.0) as u8,
(col.green * 255.0) as u8,
(col.blue * 255.0) as u8,
),
});
}
Expand Down

0 comments on commit c8d7b78

Please sign in to comment.