|
declare type CSSColor = |
|
| 'aliceblue' |
|
| 'antiquewhite' |
|
| 'aqua' |
|
| 'aquamarine' |
|
| 'azure' |
|
| 'beige' |
|
| 'bisque' |
|
| 'black' |
|
| 'blanchedalmond' |
|
| 'blue' |
|
| 'blueviolet' |
|
| 'brown' |
|
| 'burlywood' |
|
| 'cadetblue' |
|
| 'chartreuse' |
|
| 'chocolate' |
|
| 'coral' |
|
| 'cornflowerblue' |
|
| 'cornsilk' |
|
| 'crimson' |
|
| 'cyan' |
|
| 'darkblue' |
|
| 'darkcyan' |
|
| 'darkgoldenrod' |
|
| 'darkgray' |
|
| 'darkgreen' |
|
| 'darkgrey' |
|
| 'darkkhaki' |
|
| 'darkmagenta' |
|
| 'darkolivegreen' |
|
| 'darkorange' |
|
| 'darkorchid' |
|
| 'darkred' |
|
| 'darksalmon' |
|
| 'darkseagreen' |
|
| 'darkslateblue' |
|
| 'darkslategray' |
|
| 'darkslategrey' |
|
| 'darkturquoise' |
|
| 'darkviolet' |
|
| 'deeppink' |
|
| 'deepskyblue' |
|
| 'dimgray' |
|
| 'dimgrey' |
|
| 'dodgerblue' |
|
| 'firebrick' |
|
| 'floralwhite' |
|
| 'forestgreen' |
|
| 'fuchsia' |
|
| 'gainsboro' |
|
| 'ghostwhite' |
|
| 'gold' |
|
| 'goldenrod' |
|
| 'gray' |
|
| 'green' |
|
| 'greenyellow' |
|
| 'grey' |
|
| 'honeydew' |
|
| 'hotpink' |
|
| 'indianred' |
|
| 'indigo' |
|
| 'ivory' |
|
| 'khaki' |
|
| 'lavender' |
|
| 'lavenderblush' |
|
| 'lawngreen' |
|
| 'lemonchiffon' |
|
| 'lightblue' |
|
| 'lightcoral' |
|
| 'lightcyan' |
|
| 'lightgoldenrodyellow' |
|
| 'lightgray' |
|
| 'lightgreen' |
|
| 'lightgrey' |
|
| 'lightpink' |
|
| 'lightsalmon' |
|
| 'lightseagreen' |
|
| 'lightskyblue' |
|
| 'lightslategray' |
|
| 'lightslategrey' |
|
| 'lightsteelblue' |
|
| 'lightyellow' |
|
| 'lime' |
|
| 'limegreen' |
|
| 'linen' |
|
| 'magenta' |
|
| 'maroon' |
|
| 'mediumaquamarine' |
|
| 'mediumblue' |
|
| 'mediumorchid' |
|
| 'mediumpurple' |
|
| 'mediumseagreen' |
|
| 'mediumslateblue' |
|
| 'mediumspringgreen' |
|
| 'mediumturquoise' |
|
| 'mediumvioletred' |
|
| 'midnightblue' |
|
| 'mintcream' |
|
| 'mistyrose' |
|
| 'moccasin' |
|
| 'navajowhite' |
|
| 'navy' |
|
| 'oldlace' |
|
| 'olive' |
|
| 'olivedrab' |
|
| 'orange' |
|
| 'orangered' |
|
| 'orchid' |
|
| 'palegoldenrod' |
|
| 'palegreen' |
|
| 'paleturquoise' |
|
| 'palevioletred' |
|
| 'papayawhip' |
|
| 'peachpuff' |
|
| 'peru' |
|
| 'pink' |
|
| 'plum' |
|
| 'powderblue' |
|
| 'purple' |
|
| 'rebeccapurple' |
|
| 'red' |
|
| 'rosybrown' |
|
| 'royalblue' |
|
| 'saddlebrown' |
|
| 'salmon' |
|
| 'sandybrown' |
|
| 'seagreen' |
|
| 'seashell' |
|
| 'sienna' |
|
| 'silver' |
|
| 'skyblue' |
|
| 'slateblue' |
|
| 'slategray' |
|
| 'slategrey' |
|
| 'snow' |
|
| 'springgreen' |
|
| 'steelblue' |
|
| 'tan' |
|
| 'teal' |
|
| 'thistle' |
|
| 'tomato' |
|
| 'turquoise' |
|
| 'violet' |
|
| 'wheat' |
|
| 'white' |
|
| 'whitesmoke' |
|
| 'yellow' |
|
| 'yellowgreen'; |
|
|
|
declare namespace ansiStyles { |
|
interface ColorConvert { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rgb(red: number, green: number, blue: number): string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
hex(hex: string): string; |
|
|
|
|
|
|
|
|
|
keyword(keyword: CSSColor): string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hsl(hue: number, saturation: number, lightness: number): string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hsv(hue: number, saturation: number, value: number): string; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hwb(hue: number, whiteness: number, blackness: number): string; |
|
|
|
|
|
|
|
|
|
ansi(ansi: number): string; |
|
|
|
|
|
|
|
|
|
ansi256(ansi: number): string; |
|
} |
|
|
|
interface CSPair { |
|
|
|
|
|
|
|
readonly open: string; |
|
|
|
|
|
|
|
|
|
readonly close: string; |
|
} |
|
|
|
interface ColorBase { |
|
readonly ansi: ColorConvert; |
|
readonly ansi256: ColorConvert; |
|
readonly ansi16m: ColorConvert; |
|
|
|
|
|
|
|
|
|
readonly close: string; |
|
} |
|
|
|
interface Modifier { |
|
|
|
|
|
|
|
readonly reset: CSPair; |
|
|
|
|
|
|
|
|
|
readonly bold: CSPair; |
|
|
|
|
|
|
|
|
|
readonly dim: CSPair; |
|
|
|
|
|
|
|
|
|
readonly italic: CSPair; |
|
|
|
|
|
|
|
|
|
readonly underline: CSPair; |
|
|
|
|
|
|
|
|
|
readonly inverse: CSPair; |
|
|
|
|
|
|
|
|
|
readonly hidden: CSPair; |
|
|
|
|
|
|
|
|
|
readonly strikethrough: CSPair; |
|
} |
|
|
|
interface ForegroundColor { |
|
readonly black: CSPair; |
|
readonly red: CSPair; |
|
readonly green: CSPair; |
|
readonly yellow: CSPair; |
|
readonly blue: CSPair; |
|
readonly cyan: CSPair; |
|
readonly magenta: CSPair; |
|
readonly white: CSPair; |
|
|
|
|
|
|
|
|
|
readonly gray: CSPair; |
|
|
|
|
|
|
|
|
|
readonly grey: CSPair; |
|
|
|
readonly blackBright: CSPair; |
|
readonly redBright: CSPair; |
|
readonly greenBright: CSPair; |
|
readonly yellowBright: CSPair; |
|
readonly blueBright: CSPair; |
|
readonly cyanBright: CSPair; |
|
readonly magentaBright: CSPair; |
|
readonly whiteBright: CSPair; |
|
} |
|
|
|
interface BackgroundColor { |
|
readonly bgBlack: CSPair; |
|
readonly bgRed: CSPair; |
|
readonly bgGreen: CSPair; |
|
readonly bgYellow: CSPair; |
|
readonly bgBlue: CSPair; |
|
readonly bgCyan: CSPair; |
|
readonly bgMagenta: CSPair; |
|
readonly bgWhite: CSPair; |
|
|
|
|
|
|
|
|
|
readonly bgGray: CSPair; |
|
|
|
|
|
|
|
|
|
readonly bgGrey: CSPair; |
|
|
|
readonly bgBlackBright: CSPair; |
|
readonly bgRedBright: CSPair; |
|
readonly bgGreenBright: CSPair; |
|
readonly bgYellowBright: CSPair; |
|
readonly bgBlueBright: CSPair; |
|
readonly bgCyanBright: CSPair; |
|
readonly bgMagentaBright: CSPair; |
|
readonly bgWhiteBright: CSPair; |
|
} |
|
} |
|
|
|
declare const ansiStyles: { |
|
readonly modifier: ansiStyles.Modifier; |
|
readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; |
|
readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; |
|
readonly codes: ReadonlyMap<number, number>; |
|
} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; |
|
|
|
export = ansiStyles; |
|
|