Liking cljdoc? Tell your friends :D

charm.style.color

Terminal color handling.

Supports:

  • ANSI 16 basic colors (0-15)
  • ANSI 256 extended palette (0-255)
  • True color RGB (24-bit)
Terminal color handling.

Supports:
- ANSI 16 basic colors (0-15)
- ANSI 256 extended palette (0-255)
- True color RGB (24-bit)
raw docstring

*color-profile*clj

Current color profile. Default is true-color.

Current color profile. Default is true-color.
sourceraw docstring

ansiclj

(ansi color)

Create an ANSI 16 color (0-15). Accepts a number or keyword like :red, :bright-blue.

Create an ANSI 16 color (0-15).
Accepts a number or keyword like :red, :bright-blue.
sourceraw docstring

ansi-colorsclj

ANSI 16 basic color names to codes.

ANSI 16 basic color names to codes.
sourceraw docstring

ansi-hexclj

ANSI 16 colors as hex values for conversion.

ANSI 16 colors as hex values for conversion.
sourceraw docstring

ansi256clj

(ansi256 code)

Create an ANSI 256 color (0-255).

Create an ANSI 256 color (0-255).
sourceraw docstring

apply-color-bgclj

(apply-color-bg style color)

Apply background color to an AttributedStyle.

Apply background color to an AttributedStyle.
sourceraw docstring

apply-color-fgclj

(apply-color-fg style color)

Apply foreground color to an AttributedStyle.

Apply foreground color to an AttributedStyle.
sourceraw docstring

blackclj

source

blueclj

source

bright-blackclj

source

bright-blueclj

source

bright-cyanclj

source

bright-greenclj

source

bright-magentaclj

source

bright-redclj

source

bright-whiteclj

source

bright-yellowclj

source

color-profilesclj

Available color profiles.

Available color profiles.
sourceraw docstring

cyanclj

source

detect-color-profileclj

(detect-color-profile)

Detect terminal color profile from environment. Returns :ascii, :ansi, :ansi256, or :true-color.

Detect terminal color profile from environment.
Returns :ascii, :ansi, :ansi256, or :true-color.
sourceraw docstring

downgrade-colorclj

(downgrade-color color profile)

Downgrade a color to fit a color profile.

Downgrade a color to fit a color profile.
sourceraw docstring

greenclj

source

hexclj

(hex hex-str)

Create a true color from a hex string like "#ff0000" or "ff0000".

Create a true color from a hex string like "#ff0000" or "ff0000".
sourceraw docstring

magentaclj

source

no-colorclj

(no-color)

Create a no-color (transparent) value.

Create a no-color (transparent) value.
sourceraw docstring

redclj

source

rgbclj

(rgb r g b)

Create a true color from RGB values (0-255 each).

Create a true color from RGB values (0-255 each).
sourceraw docstring

rgb->ansi256clj

(rgb->ansi256 {:keys [r g b]})

Convert RGB to closest ANSI 256 color.

Convert RGB to closest ANSI 256 color.
sourceraw docstring

styled-strclj

(styled-str text & {:keys [fg bg]})

Create a styled string with foreground and/or background color. Returns the string with ANSI escape sequences applied.

Create a styled string with foreground and/or background color.
Returns the string with ANSI escape sequences applied.
sourceraw docstring

whiteclj

source

yellowclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close