Skip to content

Commit 280e8dd

Browse files
committed
Fix brighter-darker test
1 parent a8fda17 commit 280e8dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/core/graphics/color.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ fn test_rgb_to_hsv() {
561561

562562
#[test]
563563
fn test_brighter_darker() {
564-
let blue = Color::from_rgb_f32(0.0, 0.0, 0.5);
565-
assert_eq!(blue.brighter(0.5), Color::from_rgb_f32(0.0, 0.0, 0.75));
566-
assert_eq!(blue.darker(0.5), Color::from_rgb_f32(0.0, 0.0, 1.0 / 3.0));
564+
let blue = Color::from_rgb_u8(0, 0, 128);
565+
assert_eq!(blue.brighter(0.5), Color::from_rgb_f32(0.0, 0.0, 0.75294125));
566+
assert_eq!(blue.darker(0.5), Color::from_rgb_f32(0.0, 0.0, 0.33464053));
567567
}
568568

569569
#[test]

0 commit comments

Comments
 (0)