ansi-to-tui
Parse text with ansi color codes and turn them into tui::text::Text
.
Supports TrueColor ( RGB ) ( \x1b[38;2;<r>;<g>;<b>m
)
Supports 8 - Bit Color ( 0..256 ) ( \x1b[38;5;<n>m
)
Supports 4 - Bit Color Pallete ( \x1b[30..37;40..47m
)
Example
use ansi_to_text;
use Read;
let mut file = open.unwrap;
let mut buffer: = Vec new;
file.read_to_end;
let text = ansi_to_text;
A naive implementation, relatively fast.
Probably lots of room for improvement.