Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.
/ colorparse Public archive

Rust library to parse color configuration strings (in Git syntax) into ansi_term::Style objects

Notifications You must be signed in to change notification settings

joshtriplett/colorparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation notice

I recommend using anstyle-git instead of this crate. colorparse works exclusively with ansi_term; anstyle-git and the anstyle family of crates provide an abstraction over several text formatting libraries.

colorparse

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();

About

Rust library to parse color configuration strings (in Git syntax) into ansi_term::Style objects

Resources

Stars

Watchers

Forks

Sponsor this project

 

Contributors 2

  •  
  •  

Languages