simply-colored
This crate is the simplest yet ergonomic way to add color to your terminal.
[]
= "0.1"
All this crate contains is a few dozen constants corresponding to particular ANSI escape codes.
Usage
use *;
println!
Foreground
| Color | Type | To get |
|---|---|---|
![]() |
{GREEN}Simply colored! |
![]() |
![]() |
{YELLOW}Simply colored! |
![]() |
![]() |
{RED}Simply colored! |
![]() |
![]() |
{MAGENTA}Simply colored! |
![]() |
![]() |
{BLUE}Simply colored! |
![]() |
![]() |
{CYAN}Simply colored! |
![]() |
![]() |
{WHITE}Simply colored! |
![]() |
![]() |
{BLACK}Simply colored! |
![]() |
![]() |
{DIM_GREEN}Simply colored! |
![]() |
![]() |
{DIM_YELLOW}Simply colored! |
![]() |
![]() |
{DIM_RED}Simply colored! |
![]() |
![]() |
{DIM_MAGENTA}Simply colored! |
![]() |
![]() |
{DIM_BLUE}Simply colored! |
![]() |
![]() |
{DIM_CYAN}Simply colored! |
![]() |
![]() |
{DIM_WHITE}Simply colored! |
![]() |
![]() |
{DIM_BLACK}Simply colored! |
![]() |
Background
| Color | Type | To get |
|---|---|---|
![]() |
{BG_GREEN}Simply colored! |
![]() |
![]() |
{BG_YELLOW}Simply colored! |
![]() |
![]() |
{BG_RED}Simply colored! |
![]() |
![]() |
{BG_MAGENTA}Simply colored! |
![]() |
![]() |
{BG_BLUE}Simply colored! |
![]() |
![]() |
{BG_CYAN}Simply colored! |
![]() |
![]() |
{BG_WHITE}Simply colored! |
![]() |
![]() |
{BG_BLACK}Simply colored! |
![]() |
![]() |
{BG_DIM_GREEN}Simply colored! |
![]() |
![]() |
{BG_DIM_YELLOW}Simply colored! |
![]() |
![]() |
{BG_DIM_RED}Simply colored! |
![]() |
![]() |
{BG_DIM_MAGENTA}Simply colored! |
![]() |
![]() |
{BG_DIM_BLUE}Simply colored! |
![]() |
![]() |
{BG_DIM_CYAN}Simply colored! |
![]() |
![]() |
{BG_DIM_WHITE}Simply colored! |
![]() |
![]() |
{BG_DIM_BLACK}Simply colored! |
![]() |
Effects
| Effect | Type |
|---|---|
| Italic | {ITALIC}Simply colored! |
| Bold | {BOLD}Simply colored! |
| Underline | {UNDERLINE}Simply colored! |
| Blink | {BLINK}Simply colored! |
| Reverse | {REVERSE}Simply colored! |
| Strikethrough | {STRIKETHROUGH}Simply colored! |
| Dim | {DIM}Simply colored! |
| Hide | {HIDE}Simply colored! |
| Reset all styles | {RESET}Simply colored! |
All effects can be prefixed with NO_ to disable e.g. NO_BOLD.
Extra
If you want links in the terminal, all you need is:
Example usage:
println!;















































