ticterm.esc.color

Constants

ticterm.esc.color.black
ticterm.esc.color.red
ticterm.esc.color.green
ticterm.esc.color.yellow
ticterm.esc.color.blue
ticterm.esc.color.magenta
ticterm.esc.color.cyan
ticterm.esc.color.white
ticterm.esc.color.brblack
ticterm.esc.color.brred
ticterm.esc.color.brgreen
ticterm.esc.color.bryellow
ticterm.esc.color.brblue
ticterm.esc.color.brmagenta
ticterm.esc.color.brcyan
ticterm.esc.color.brwhite

Functions

ticterm.esc.color.get(color, *, bg=False)

Get color or style from input. Accepts Style objects, ansi color ids, or names.

Parameters:
  • color (Style | int | str)

  • bg (bool) – Should background color escape code be returned instead of foreground?

Return type:

Style

ticterm.esc.color.replace_normal(style, *items)

Replaces all instances of normal in items.

Parameters:
  • style (Style | int | str)

  • items (str)

Return type:

list[str] | str