ansi-to-tui

drone build github build downloads

A nom parser to parse text with ANSI color codes and turn them into ratatui::text::Text.

| Color | Supported | Examples | | ------ | :-------: | ------------------------ | | 24 bit | ✓ | \x1b[38;2;<R>;<G>;<B>m | | 8 bit | ✓ | \x1b[38;5;<N>m | | 4 bit | ✓ | \x1b[30..37;40..47m |

Example

rust use ansi_to_tui::IntoText; let buffer = std::fs::read("ascii/text.ascii").unwrap(); let output = buffer.into_text();