diff --git a/crates/ecolor/src/color32.rs b/crates/ecolor/src/color32.rs index 07c8f9ca206..0c31a8e8f27 100644 --- a/crates/ecolor/src/color32.rs +++ b/crates/ecolor/src/color32.rs @@ -241,10 +241,10 @@ impl Color32 { use emath::lerp; Self::from_rgba_premultiplied( - lerp((self[0] as f32)..=(other[0] as f32), t).round() as u8, - lerp((self[1] as f32)..=(other[1] as f32), t).round() as u8, - lerp((self[2] as f32)..=(other[2] as f32), t).round() as u8, - lerp((self[3] as f32)..=(other[3] as f32), t).round() as u8, + fast_round(lerp((self[0] as f32)..=(other[0] as f32), t)), + fast_round(lerp((self[1] as f32)..=(other[1] as f32), t)), + fast_round(lerp((self[2] as f32)..=(other[2] as f32), t)), + fast_round(lerp((self[3] as f32)..=(other[3] as f32), t)), ) } }