Crate xterm_color

Source
Expand description

Parses the subset of X11 Color Strings emitted by terminals in response to OSC color queries (OSC 10, OSC 11, …).

use xterm_color::Color;

assert_eq!(
   Color::parse(b"rgb:11/aa/ff").unwrap(),
   Color::rgb(0x1111, 0xaaaa, 0xffff)
);

Structs§

  • An RGB color with 16 bits per channel and an optional alpha channel.
  • Error which can be returned when parsing a color.