Skip to main content
Module

x/crayon/mod.ts>Crayon

🖍️ Terminal styling done light and fast.
Go to Latest
type alias Crayon
import { type Crayon } from "https://deno.land/x/crayon@3.3.2/mod.ts";

Crayon type which can be easily extended C - literal string type for extending styles O - object which expands

Type Parameters

optional
C extends string = never
optional
O extends Record<string, unknown> = Record<never, never>
definition:
& ((single: unknown, ...many: unknown[]) => string)
& prototype
& { styleBuffer: string; usesFunc: boolean; keyword(style: Style): Crayon<C, O>; keyword(style: string): Crayon<C, O>; ansi3(code: number): Crayon<C, O>; bgAnsi3(code: number): Crayon<C, O>; ansi4(code: number): Crayon<C, O>; bgAnsi4(code: number): Crayon<C, O>; ansi8(code: number): Crayon<C, O>; bgAnsi8(code: number): Crayon<C, O>; rgb(
r: number,
g: number,
b: number,
): Crayon<C, O>; bgRgb(
r: number,
g: number,
b: number,
): Crayon<C, O>; hsl(
h: number,
s: number,
l: number,
): Crayon<C, O>; bgHsl(
h: number,
s: number,
l: number,
): Crayon<C, O>; hex(hex: string | number): Crayon<C, O>; bgHex(hex: string | number): Crayon<C, O>; }
& [style in Style | C]: Crayon<C, O>
& O