UNPKG

@visulima/is-ansi-color-supported

Version:

Detect whether a terminal or browser supports ansi colors.

12 lines (8 loc) 456 B
type ColorSupportLevel = 0 | 1 | 2 | 3; declare const SPACE_MONO = 0; declare const SPACE_16_COLORS = 1; declare const SPACE_256_COLORS = 2; declare const SPACE_TRUE_COLORS = 3; declare const isStdoutColorSupported: () => ColorSupportLevel; declare const isStderrColorSupported: () => ColorSupportLevel; export { type ColorSupportLevel, SPACE_16_COLORS, SPACE_256_COLORS, SPACE_MONO, SPACE_TRUE_COLORS, isStderrColorSupported, isStdoutColorSupported };