From d32c3f7d7fd5b32e93911d73f8f7e8e255f37ad4 Mon Sep 17 00:00:00 2001 From: Juergen Stuber Date: Wed, 6 Nov 2024 20:47:05 +0100 Subject: [PATCH] Use a darker background --- src/bin/primes/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/primes/main.rs b/src/bin/primes/main.rs index 26f1b79..83f224b 100644 --- a/src/bin/primes/main.rs +++ b/src/bin/primes/main.rs @@ -16,6 +16,7 @@ type Error = Box; type Result = std::result::Result; const COLORS: usize = 4; +const WHITE_VALUE: u8 = 128; #[derive(Clone, Copy, Debug, PartialEq, Eq)] enum Pixel { @@ -47,7 +48,7 @@ fn send(w: &mut T, frame: &Frame) -> Result<()> { for x in frame.bbox().x_range() { let pixel = frame.pixels[p2d(x, y)]; let white = match pixel { - Pixel::Background => 170, + Pixel::Background => WHITE_VALUE, Pixel::Foreground => 0, }; let rgbw: &[u8] = &[0, 0, 0, white];