UNPKG

@bevry/ansi

Version:

ANSI colors and styles for Deno, Node.js, JavaScript, and TypeScript

130 lines 5.88 kB
export declare enum Color { Black = 0, Red = 1, Green = 2, Yellow = 3, Blue = 4, Magenta = 5, Cyan = 6, White = 7 } /** * A factory method to generate an ANSI style applier from the open and close codes * @param open - The ANSI open code for the style * @param close - The ANSI close code for the style * @returns A function that applies the ANSI style to a string */ export declare function style(open: number, close: number): (str: string) => string; /** * A factory method to generate an ANSI foreground color applier from the foreground color code * @param color The color to apply to the foreground * @param bright Whether to use the bright variant of the color * @returns A function that applies the ANSI foreground color to a string */ export declare function foregroundColor(color: Color, bright?: boolean): (str: string) => string; /** * A factory method to generate an ANSI background color applier from the background color code * @param color The color to apply to the background * @param bright Whether to use the bright variant of the color * @returns A function that applies the ANSI background color to a string */ export declare function backgroundColor(color: Color, bright?: boolean): (str: string) => string; /** Make the text look normal */ export declare const reset: (str: string) => string; /** Make the text bold, or with increased intensity */ export declare const bold: (str: string) => string; /** Make the text faint, or with decreased intensity */ export declare const faint: (str: string) => string; /** Make the text bold, or with increased intensity */ export declare const bright: (str: string) => string; /** Make the text faint, or with decreased intensity */ export declare const dim: (str: string) => string; /** Make the text italicized */ export declare const italic: (str: string) => string; /** Make the text underlined */ export declare const underline: (str: string) => string; /** Make the text slow blink */ export declare const slowBlink: (str: string) => string; /** Make the text slow blink */ export declare const blink: (str: string) => string; /** Make the text rapid blink */ export declare const rapidBlink: (str: string) => string; /** Invert the colors of the text */ export declare const inverse: (str: string) => string; /** Make the text concealed */ export declare const conceal: (str: string) => string; /** Make the text crossed-out */ export declare const crossout: (str: string) => string; /** Make the text crossed-out */ export declare const strikethrough: (str: string) => string; /** Make the text framed */ export declare const frame: (str: string) => string; /** Make the text encircled */ export declare const encircle: (str: string) => string; /** Make the text overlined */ export declare const overline: (str: string) => string; /** Make the text black */ export declare const black: (str: string) => string; /** Make the text red */ export declare const red: (str: string) => string; /** Make the text green */ export declare const green: (str: string) => string; /** Make the text yellow */ export declare const yellow: (str: string) => string; /** Make the text blue */ export declare const blue: (str: string) => string; /** Make the text magenta */ export declare const magenta: (str: string) => string; /** Make the text cyan */ export declare const cyan: (str: string) => string; /** Make the text white */ export declare const white: (str: string) => string; /** Make the text bright black */ export declare const brightBlack: (str: string) => string; /** Make the text bright red */ export declare const brightRed: (str: string) => string; /** Make the text bright green */ export declare const brightGreen: (str: string) => string; /** Make the text bright yellow */ export declare const brightYellow: (str: string) => string; /** Make the text bright blue */ export declare const brightBlue: (str: string) => string; /** Make the text bright magenta */ export declare const brightMagenta: (str: string) => string; /** Make the text bright cyan */ export declare const brightCyan: (str: string) => string; /** Make the text bright white */ export declare const brightWhite: (str: string) => string; /** Make the text's background black */ export declare const bgBlack: (str: string) => string; /** Make the text's background red */ export declare const bgRed: (str: string) => string; /** Make the text's background green */ export declare const bgGreen: (str: string) => string; /** Make the text's background yellow */ export declare const bgYellow: (str: string) => string; /** Make the text's background blue */ export declare const bgBlue: (str: string) => string; /** Make the text's background magenta */ export declare const bgMagenta: (str: string) => string; /** Make the text's background cyan */ export declare const bgCyan: (str: string) => string; /** Make the text's background white */ export declare const bgWhite: (str: string) => string; /** Make the text's background bright black */ export declare const bgBrightBlack: (str: string) => string; /** Make the text's background bright red */ export declare const bgBrightRed: (str: string) => string; /** Make the text's background bright green */ export declare const bgBrightGreen: (str: string) => string; /** Make the text's background bright yellow */ export declare const bgBrightYellow: (str: string) => string; /** Make the text's background bright blue */ export declare const bgBrightBlue: (str: string) => string; /** Make the text's background bright magenta */ export declare const bgBrightMagenta: (str: string) => string; /** Make the text's background bright cyan */ export declare const bgBrightCyan: (str: string) => string; /** Make the text's background bright white */ export declare const bgBrightWhite: (str: string) => string; //# sourceMappingURL=all.d.ts.map