Function termimad::parse_color

source ·
pub fn parse_color(s: &str) -> Result<Color, ParseColorError>
Expand description

Read a Crossterm color from a string.

It may be either

  • one of the few known color name. Example: “darkred”
  • grayscale with level in [0,24[. Example: “grey(5)”
  • an Ansi code. Example “ansi(106)”
  • RGB. Example: “rgb(25, 100, 0)”