b26cdf9f3f
·
2025-05-04 17:49:09 +07:00
10 Commits
thing with style
color
color has a lot of colors: we have
-
1234567 that takes 30 40 (90 100)
-
38 / 48 with 2 mode (256^3) or 5 mode (256)
which can cover 30..=37 like this: 38;5;(0..=7)
(same goes with 40..=47, 90 = 38;5;8 (8 + 0)) -
39 49 reset / default
style
a lot of styles, will cover 0..=9 | 21..=29
constructor
i do not know how to do this at all
how do i call
(this is only an example, if i thought this out ill chaneg)
// how do i call
let style = Style::new("text");
style.green(); // ???
style.underline();
let string = style.render();
let style2 = Style::new();
style2.bold().yellow().italic();
let string = style2.apply("string".into()); //????
let style3 = Style::new();
style3.style(Style_::ITALIC).style(Style_::SLOW_BLINK);
style3.color(Color_::RED).color(Color_::WHITE.bg()); // ??? what the hell is this
let red1 = Color::RED.bg().into(); // ?????
let red2 = Color.red().bg(); // also why into
internally. how do i deal with storage + formatting? use vec? keep struct til infinity? struct & enum -ception? tf do
Languages
Rust
100%