We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8fda17 commit 280e8ddCopy full SHA for 280e8dd
internal/core/graphics/color.rs
@@ -561,9 +561,9 @@ fn test_rgb_to_hsv() {
561
562
#[test]
563
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));
+ let blue = Color::from_rgb_u8(0, 0, 128);
+ assert_eq!(blue.brighter(0.5), Color::from_rgb_f32(0.0, 0.0, 0.75294125));
+ assert_eq!(blue.darker(0.5), Color::from_rgb_f32(0.0, 0.0, 0.33464053));
567
}
568
569
0 commit comments