Ansi color convenience
Ansi color convenience
(ansi color-or-opt & body)
Wrap some text in ansi
Wrap some text in ansi
(ansi-int color & body)
Wrap some text in ansi
Wrap some text in ansi
(determine-colors cli)
Determine what colors the client supports (if any) and update the :colors field on the client object accordingly. If the field is already non-nil, this is a nop (since the lib user might want to handle this themself with a user pref, for example)
Determine what colors the client supports (if any) and update the :colors field on the client object accordingly. If the field is already non-nil, this is a nop (since the lib user might want to handle this themself with a user pref, for example)
(process-colors input)
Given a string, replace color sequences with the appropriate ansi.
We use the sequence {X
for colors, where X is one of:
To get the brighter variant of a color, use the capital letter (eg {R
for bright red, {W for pure white, etc). If you want a literal {
character followed by one of the above letters, simply repeat the
{
, like {{Woo}
.
Given a string, replace color sequences with the appropriate ansi. We use the sequence `{X` for colors, where X is one of: - n = Reset color - d = Dark (black) color - r = Red - g = Green - y = Yellow - b = Blue - p = Purple (magenta) - c = Cyan - w = White To get the brighter variant of a color, use the capital letter (eg {R for bright red, {W for pure white, etc). If you want a literal `{` character followed by one of the above letters, simply repeat the `{`, like `{{Woo}`.
(strip-colors input)
Given a string, strip out color sequences. This should be used for
clients that don't support ansi. See process-colors
for color
sequences
Given a string, strip out color sequences. This should be used for clients that don't support ansi. See `process-colors` for color sequences
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close