std.print.ansi
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”) => “[34mhello[0m”
;; Background: ;; on-blue on-cyan on-green on-grey ;; on-magenta on-red on-white on-yellow
(on-white “hello”) => “[47mhello[0m”
;; Attributes: ;; blink bold concealed dark reverse-color underline
(blink “hello”) => “[5mhello[0m”
encode
added in 3.0
(encode & modifiers)encodes the ansi characters for modifiers (encode :bold) => “[1m”
(encode :red) => “[31m”
encode-raw
added in 3.0
(encode-raw codes)encodes the raw ansi modifier codes to string
(encode-raw 30 20) => “[30;20m”
style
added in 3.0
(style text modifiers)styles the text according to the modifiers
(style “hello” :bold :red) => “[1;31mhello[0m”
style:remove
added in 3.0
(style:remove text)removes ansi formatting
(style:remove “[22;47;34m Hello [0m”) => string?