color #
Constants #
const black = AnsiColor('black')
const red = AnsiColor('red')
const green = AnsiColor('green')
const yellow = AnsiColor('yellow')
const blue = AnsiColor('blue')
const magenta = AnsiColor('magenta')
const cyan = AnsiColor('cyan')
const white = AnsiColor('white')
const high_black = AnsiColor('high_black')
const high_red = AnsiColor('high_red')
const high_green = AnsiColor('high_green')
const high_yellow = AnsiColor('high_yellow')
const high_blue = AnsiColor('high_blue')
const high_magenta = AnsiColor('high_magenta')
const high_cyan = AnsiColor('high_cyan')
const high_white = AnsiColor('high_white')
fn new #
fn new(text string) Text
fn rgb #
fn rgb(r u8, g u8, b u8) Rgb
type AnsiColor #
type AnsiColor = string
type Color #
type Color = string | AnsiColor | Rgb
struct Rgb #
struct Rgb {
r u8
g u8
b u8
}
struct Text #
@[noinit]
struct Text {
text string
prefix string
}
fn (Text) str #
fn (t Text) str() string
fn (Text) foreground #
fn (t Text) foreground(c Color) Text
fn (Text) background #
fn (t Text) background(c Color) Text
fn (Text) bold #
fn (t Text) bold() Text
fn (Text) dim #
fn (t Text) dim() Text
fn (Text) italic #
fn (t Text) italic() Text
fn (Text) underline #
fn (t Text) underline() Text
fn (Text) blink #
fn (t Text) blink() Text
fn (Text) rapid_blink #
fn (t Text) rapid_blink() Text
fn (Text) reverse #
fn (t Text) reverse() Text
fn (Text) strikethrough #
fn (t Text) strikethrough() Text