colorparse 2.0.0

Parse color configuration strings (in Git syntax) into ansi_term::Style objects.

Crate colorparse [] [src]

colorparse::parse parses a color configuration string (in Git syntax) into an ansi_term::Style:

Examples

if let Ok(color) = colorparse::parse("bold red blue") {
    println!("{}", color.paint("Bold red on blue"));
}

let hyperlink_style = colorparse::parse("#0000ee ul").unwrap();Run

Enums

Error

Type for errors returned by the parser.

Functions

parse

Parse a string in Git's color configuration syntax into an ansi_term::Style.