From 97e6e12799092f1cc7a9cd0eeb11abe88584fb42 Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Fri, 3 Feb 2023 12:27:42 -0800 Subject: [PATCH] Use accessible colors that maintain contrast in the conflation scene --- examples/scenes/src/test_scenes.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/scenes/src/test_scenes.rs b/examples/scenes/src/test_scenes.rs index c666663..47a4ff9 100644 --- a/examples/scenes/src/test_scenes.rs +++ b/examples/scenes/src/test_scenes.rs @@ -414,11 +414,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) { let x = N + 0.5; // Fractional pixel offset reveals the problem on axis-aligned edges. let mut y = N; + let bg_color = Color::rgb8(255, 194, 19); + let fg_color = Color::rgb8(12, 165, 255); + // Two adjacent triangles touching at diagonal edge with opposing winding numbers sb.fill( Fill::NonZero, Affine::translate((x, y)) * scale, - Color::RED, + fg_color, None, &[ // triangle 1 @@ -439,14 +442,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) { sb.fill( Fill::EvenOdd, Affine::translate((x, y)) * scale, - Color::RED, + bg_color, None, &Rect::new(0.0, 0.0, N, N), ); sb.fill( Fill::EvenOdd, Affine::translate((x, y)) * scale, - Color::GREEN, + fg_color, None, &[ // left rect @@ -467,14 +470,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) { sb.fill( Fill::EvenOdd, Affine::translate((x, y)) * scale, - Color::RED, + bg_color, None, &Rect::new(0.0, 0.0, N, N), ); sb.fill( Fill::EvenOdd, Affine::translate((x, y)) * scale, - Color::GREEN, + fg_color, None, &[ // left rect