Liking cljdoc? Tell your friends :D

rainboots.color

Ansi color convenience

Ansi color convenience
raw docstring

ansicljmacro

(ansi color-or-opt & body)

Wrap some text in ansi

Wrap some text in ansi
sourceraw docstring

ansi-clear1clj

source

ansi-codesclj

source

ansi-escclj

source

ansi-intcljmacro

(ansi-int color & body)

Wrap some text in ansi

Wrap some text in ansi
sourceraw docstring

ansi1clj

(ansi1 n)
source

ansi2clj

(ansi2 n1 n2)
source

color-seq-regexclj

source

color-sequencesclj

source

determine-colorsclj

(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)
sourceraw docstring

process-colorsclj

(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:

  • 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}.

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}`.
sourceraw docstring

strip-colorsclj

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close