diff --git a/examples/256color.rs b/examples/256color.rs index 04c4e0a..4a62a55 100644 --- a/examples/256color.rs +++ b/examples/256color.rs @@ -3,6 +3,8 @@ use std::{ io::{Read, Seek}, }; +use ansistream::{FC_WHITE, FC_BLACK}; + fn flush(reader: &mut R, writer: &mut W) -> std::io::Result<()> { reader.seek(std::io::SeekFrom::Start(0))?; std::io::copy(reader, writer)?; @@ -53,13 +55,13 @@ fn main() -> std::io::Result<()> { for i in 0..=23 { if i < 12 { - fg = 255; + fg = FC_WHITE; } else { - fg = 0; + fg = FC_BLACK; } let ie = i + 232; - astream.write_attribute(fg)?; + astream.write_text_fc(fg, "")?; astream.write_text_bc256_fmt(ie, format_args!("{ie:<4}"))?; } diff --git a/images/256color.png b/images/256color.png index 0c5b191..b6c381a 100644 Binary files a/images/256color.png and b/images/256color.png differ