Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Print Colored Text in Terminal in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comments

There are a few crates yansi, termcolor, colored, and ansi_term in Rust which can help print colorful text in terminal. Yansi is recommended as it is dead simple and the project is active.

Hands on yansi

Green light, red light!