roundel
Api

roundel/kleur

Every export of roundel/kleur, with its signature and doc comment: kleur, plus 2 types.

import kleur from 'roundel/kleur';
import type { Color, Kleur } from 'roundel/kleur';

Constants

default

The default export, declared as kleur.

kleur's module object: enabled, then the styles.

const kleur: Kleur & {
    enabled: boolean;
};

module.exports

What require() returns: the default export, kleur, under the name Node's require(esm) reads.

Interfaces

Color

One style: text in, styled text out; nothing in, a chain out. As kleur declares it.

interface Color {
    (x: string | number): string;
    (): Kleur;
}

Kleur

Every style, by kleur's names.

interface Kleur {
    black: Color;
    red: Color;
    green: Color;
    yellow: Color;
    blue: Color;
    magenta: Color;
    cyan: Color;
    white: Color;
    gray: Color;
    grey: Color;
    bgBlack: Color;
    bgRed: Color;
    bgGreen: Color;
    bgYellow: Color;
    bgBlue: Color;
    bgMagenta: Color;
    bgCyan: Color;
    bgWhite: Color;
    reset: Color;
    bold: Color;
    dim: Color;
    italic: Color;
    underline: Color;
    inverse: Color;
    hidden: Color;
    strikethrough: Color;
}

On this page