Skip to content

Colors ​

All available color/style formatters plus support flags.

  • Import: @kjanat/dreamcli
  • Export kind: interface
  • Declared in: node_modules/ansispeck/dist/whitespace.d.ts

Signatures ​

ts
interface Colors extends Palette, Factories<Formatter> {}

Members ​

Properties ​

bg256 ​

Set the background with a 256-color palette index.

ts
bg256: { (n: number): Formatter; };

bgBlack ​

ts
bgBlack: Formatter;

bgBlackBright ​

ts
bgBlackBright: Formatter;

bgBlue ​

ts
bgBlue: Formatter;

bgBlueBright ​

ts
bgBlueBright: Formatter;

bgCyan ​

ts
bgCyan: Formatter;

bgCyanBright ​

ts
bgCyanBright: Formatter;

bgGreen ​

ts
bgGreen: Formatter;

bgGreenBright ​

ts
bgGreenBright: Formatter;

bgHex ​

Set the background from a #rgb or #rrggbb hex string.

ts
bgHex: { (color: string): Formatter; };

bgMagenta ​

ts
bgMagenta: Formatter;

bgMagentaBright ​

ts
bgMagentaBright: Formatter;

bgRed ​

ts
bgRed: Formatter;

bgRedBright ​

ts
bgRedBright: Formatter;

bgRgb ​

Set the background with a 24-bit RGB triple.

ts
bgRgb: { (r: number, g: number, b: number): Formatter; };

bgWhite ​

ts
bgWhite: Formatter;

bgWhiteBright ​

ts
bgWhiteBright: Formatter;

bgYellow ​

ts
bgYellow: Formatter;

bgYellowBright ​

ts
bgYellowBright: Formatter;

black ​

ts
black: Formatter;

blackBright ​

ts
blackBright: Formatter;
ts
blink: Formatter;

blue ​

ts
blue: Formatter;

blueBright ​

ts
blueBright: Formatter;

bold ​

ts
bold: Formatter;

cyan ​

ts
cyan: Formatter;

cyanBright ​

ts
cyanBright: Formatter;

dim ​

ts
dim: Formatter;

doubleUnderline ​

ts
doubleUnderline: Formatter;

fg256 ​

Color the foreground with a 256-color palette index.

ts
fg256: { (n: number): Formatter; };

gray ​

ts
gray: Formatter;

green ​

ts
green: Formatter;

greenBright ​

ts
greenBright: Formatter;

grey ​

ts
grey: Formatter;

hex ​

Color the foreground from a #rgb or #rrggbb hex string.

ts
hex: { (color: string): Formatter; };

hidden ​

ts
hidden: Formatter;

inverse ​

ts
inverse: Formatter;

isColorSupported ​

Whether ANSI output is enabled.

ts
isColorSupported: boolean;

isHyperlinkSupported ​

Whether link emits OSC 8 sequences. Independent of color.

ts
isHyperlinkSupported: boolean;

italic ​

ts
italic: Formatter;

Wrap text in an OSC 8 terminal hyperlink.

ts
link: LinkFormatter;

magenta ​

ts
magenta: Formatter;

magentaBright ​

ts
magentaBright: Formatter;

overline ​

ts
overline: Formatter;

red ​

ts
red: Formatter;

redBright ​

ts
redBright: Formatter;

reset ​

ts
reset: Formatter;

rgb ​

Color the foreground with a 24-bit RGB triple.

ts
rgb: { (r: number, g: number, b: number): Formatter; };

space ​

Produce one space, or count spaces when provided.

ts
space: { (count?: number): string; };

strikethrough ​

ts
strikethrough: Formatter;

tab ​

Produce one tab, or count tabs when provided.

ts
tab: { (count?: number): string; };

underline ​

ts
underline: Formatter;

white ​

ts
white: Formatter;

whiteBright ​

ts
whiteBright: Formatter;

yellow ​

ts
yellow: Formatter;

yellowBright ​

ts
yellowBright: Formatter;

See Also ​

Released under the MIT License.