Macro r3bl_rs_utils_macro::tui_style

source ·
tui_style!() { /* proc-macro */ }
Expand description

Creates a new Style declaratively. If id isn’t supplied, then u8::MAX is used. This represents the “style does not have an assigned id” case. Computed styles don’t have an id and are set to u8::MAX as well.

Here’s a usage example.

use r3bl_rs_utils_macro::{tui_style};
use r3bl_rs_utils_core::{TuiStyle, TuiColor, RgbValue};
let _ = tui_style!(attrib: [dim]);
  • All the attributes are:
    • bold, dim, underline, reverse, hidden, strikethrough
  • color_fg and color_bg can take any of the following:
    • Color enum value.
    • Rgb value.
    • Variable holding either of the above.