Skip to main content

write_set_palette

Function write_set_palette 

Source
pub fn write_set_palette<W: Write>(
    w: &mut W,
    index: u8,
    r: u8,
    g: u8,
    b: u8,
) -> Result<()>
Expand description

Set a 16-color palette entry with ESC ] P <index-hex> <rrggbb> BEL.

index must be 0..=15; values outside that range emit nothing. RGB channels are formatted as two lowercase hexadecimal digits each.