Macro minimo::hexbg

source ·
macro_rules! hexbg {
    ($hex:expr) => { ... };
    ($hex:expr, $r:expr) => { ... };
    ($hex:expr, $r:expr, $g:expr, $b:expr) => { ... };
}
Expand description

hexbg! macro to convert hex color to ansi background color example: hexbg!(#FF0000) -> “\x1b[48;2;255;0;0m\x1b[30m” example: hexbg!(#FF0000, 255) -> “\x1b[48;2;255;0;0m\x1b[30m” example: hexbg!(#FF0000, 255, 255, 255) -> “\x1b[48;2;255;0;0m\x1b[30m”