mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
* chore(cargo): update to 2024 edition * chore: fmt * chore(tuikit): update README * fix(tuikit): fix imports * feat(ci): run all tests during pr * fix(ci): exclude e2e from unit tests * fix(tests): ignore error on stdout locking failure * fix(tests): fix syntax --------- Co-authored-by: LoricAndre <loric.andre@pm.me>
32 lines
736 B
Rust
32 lines
736 B
Rust
use skim_tuikit::attr::Color;
|
|
use skim_tuikit::output::Output;
|
|
use std::io;
|
|
|
|
fn main() {
|
|
let mut output = Output::new(Box::new(io::stdout())).unwrap();
|
|
|
|
for fg in 0..=255 {
|
|
output.set_fg(Color::AnsiValue(fg));
|
|
output.write(format!("{:5}", fg).as_str());
|
|
if fg % 16 == 15 {
|
|
output.reset_attributes();
|
|
output.write("\n");
|
|
output.flush()
|
|
}
|
|
}
|
|
|
|
output.reset_attributes();
|
|
|
|
for bg in 0..=255 {
|
|
output.set_bg(Color::AnsiValue(bg));
|
|
output.write(format!("{:5}", bg).as_str());
|
|
if bg % 16 == 15 {
|
|
output.reset_attributes();
|
|
output.write("\n");
|
|
output.flush()
|
|
}
|
|
}
|
|
|
|
output.flush()
|
|
}
|