Skip to content

zhangzitao/easy_color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Color for Rust

当你在控制台需要输出时,可以方便的调整字体样式和颜色

使用方法

extern crate easy_color;
use easy_color::*;

fn main() {
    println!("{}", "Hello World!".green().red().on_blue().bold().underline().on_yellow().italic());
}

颜色,用red()

println!("{}", "Hello World!".red())

背景用on_red()

println!("{}", "Hello World!".on_red())

样式用bold()

println!("{}", "Hello World!".bold())

参考crate

About

命令行彩色工具 for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages