| Crates.io | simply_colored |
| lib.rs | simply_colored |
| version | 0.1.0 |
| created_at | 2025-06-08 19:52:38.165308+00 |
| updated_at | 2025-06-08 19:52:38.165308+00 |
| description | The simplest crate in existence for terminal colors |
| homepage | https://github.com/nik-rev/simply-colored |
| repository | https://github.com/nik-rev/simply-colored |
| max_upload_size | |
| id | 1705218 |
| size | 504,328 |
simply_coloredThis crate is the simplest yet ergonomic way to add color to your terminal:
use simply_colored::*;
println!("{BLUE}{BOLD}Simply colored!")
| 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! |
![]() |
| 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! |
![]() |
| Effect | Type |
|---|---|
| Italic | {ITALIC}Simply colored! |
| Bold | {BOLD}Simply colored! |
| Underline | {UNDERLINE}Simply colored! |
| Blink | {BLINK}Simply colored! |
| Reverse | {REVERSE}Simply colored! |
{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.
If you want links in the terminal, all you need is:
fn hyperlink(link: impl core::fmt::Display, text: impl core::fmt::Display) -> String {
format!("\x1b]8;;{link}\x1b\\{text}\x1b]8;;\x1b\\")
}
Example usage:
println!(
"Check out simply_colored on {}!",
hyperlink(
"https://github.com/nik-rev/simply-colored",
"GitHub"
)
);