std/color
ANSI terminal color and style formatting.
milo
from "std/color" import { Color }Example
milo
print(Color.bold(Color.red("error:")) + " something went wrong")
print(Color.green("ok") + " " + Color.dim("(3 tests passed)"))API reference
Color
milo
pub struct ColorColor namespace — SGR text styling (Color.red(s), Color.bold(s), ...).
Color.bgBlue
milo
fn Color.bgBlue(s: &string): stringColor.bgGreen
milo
fn Color.bgGreen(s: &string): stringColor.bgRed
milo
fn Color.bgRed(s: &string): stringColor.bgYellow
milo
fn Color.bgYellow(s: &string): stringColor.blue
milo
fn Color.blue(s: &string): stringColor.bold
milo
fn Color.bold(s: &string): stringColor.cyan
milo
fn Color.cyan(s: &string): stringColor.dim
milo
fn Color.dim(s: &string): stringColor.gray
milo
fn Color.gray(s: &string): stringColor.green
milo
fn Color.green(s: &string): stringColor.italic
milo
fn Color.italic(s: &string): stringColor.magenta
milo
fn Color.magenta(s: &string): stringColor.red
milo
fn Color.red(s: &string): stringColor.strikethrough
milo
fn Color.strikethrough(s: &string): stringColor.underline
milo
fn Color.underline(s: &string): stringColor.white
milo
fn Color.white(s: &string): stringColor.yellow
milo
fn Color.yellow(s: &string): string