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];