From 3c3d91cd515b0fb5b62bc1d35d258443c00cf8a3 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Thu, 10 Jan 2019 08:17:30 +0100 Subject: [PATCH] Use 8-bit colors instead of 24-bit truecolor --- src/main.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index e4c5ce6..0a240fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,16 +8,16 @@ use std::io::{self, prelude::*, StdoutLock}; use clap::{App, AppSettings, Arg}; use ansi_term::Colour; -use ansi_term::Colour::RGB; +use ansi_term::Colour::Fixed; const BUFFER_SIZE: usize = 64; -const COLOR_NULL: Colour = RGB(117, 113, 94); // grey -const COLOR_OFFSET: Colour = RGB(117, 113, 94); // grey -const COLOR_ASCII_PRINTABLE: Colour = RGB(102, 217, 239); // cyan -const COLOR_ASCII_WHITESPACE: Colour = RGB(166, 226, 46); // green -const COLOR_ASCII_OTHER: Colour = RGB(249, 38, 114); // magenta -const COLOR_NONASCII: Colour = RGB(253, 151, 31); // orange +const COLOR_NULL: Colour = Fixed(242); // grey +const COLOR_OFFSET: Colour = Fixed(242); // grey +const COLOR_ASCII_PRINTABLE: Colour = Fixed(81); // cyan +const COLOR_ASCII_WHITESPACE: Colour = Fixed(148); // green +const COLOR_ASCII_OTHER: Colour = Fixed(197); // magenta +const COLOR_NONASCII: Colour = Fixed(208); // orange enum ByteCategory { Null,