std.print.ansi

*custom*

dynamic

+attributes+

+colors+

+highlights+

+init+

+lookup+

blue

(blue & args)

bold

(bold & args)

bright-blue

(bright-blue & args)

bright-cyan

(bright-cyan & args)

bright-green

(bright-green & args)

bright-grey

(bright-grey & args)

bright-magenta

(bright-magenta & args)

bright-red

(bright-red & args)

bright-white

(bright-white & args)

bright-yellow

(bright-yellow & args)

concealed

(concealed & args)

cyan

(cyan & args)

dark

(dark & args)

define-ansi-forms

macro

added in 3.0

(define-ansi-forms)

defines ansi forms given by the lookups

;; Text: ;; blue cyan green grey magenta red white yellow

(blue “hello”) => “hello”

;; Background: ;; on-blue on-cyan on-green on-grey ;; on-magenta on-red on-white on-yellow

(on-white “hello”) => “hello”

;; Attributes: ;; blink bold concealed dark reverse-color underline

(blink “hello”) => “hello”

encode

added in 3.0

(encode & modifiers)

encodes the ansi characters for modifiers (encode :bold) => “”

(encode :red) => “”

encode-raw

added in 3.0

(encode-raw codes)

encodes the raw ansi modifier codes to string

(encode-raw 30 20) => “”

green

(green & args)

grey

(grey & args)

italic

(italic & args)

magenta

(magenta & args)

normal

(normal & args)

on-blue

(on-blue & args)

on-cyan

(on-cyan & args)

on-green

(on-green & args)

on-grey

(on-grey & args)

on-magenta

(on-magenta & args)

on-red

(on-red & args)

on-white

(on-white & args)

on-yellow

(on-yellow & args)

red

(red & args)

reverse-color

(reverse-color & args)

style

added in 3.0

(style text modifiers)

styles the text according to the modifiers

(style “hello” :bold :red) => “hello”

style:remove

added in 3.0

(style:remove text)

removes ansi formatting

(style:remove “ Hello ”) => string?

underline

(underline & args)

white

(white & args)

yellow

(yellow & args)