Lines Matching defs:styles
9 const styles = {
68 export const modifierNames = Object.keys(styles.modifier);
69 export const foregroundColorNames = Object.keys(styles.color);
70 export const backgroundColorNames = Object.keys(styles.bgColor);
76 for (const [groupName, group] of Object.entries(styles)) {
78 styles[styleName] = {
83 group[styleName] = styles[styleName];
88 Object.defineProperty(styles, groupName, {
94 Object.defineProperty(styles, 'codes', {
99 styles.color.close = '\u001B[39m';
100 styles.bgColor.close = '\u001B[49m';
102 styles.color.ansi = wrapAnsi16();
103 styles.color.ansi256 = wrapAnsi256();
104 styles.color.ansi16m = wrapAnsi16m();
105 styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
106 styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
107 styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
110 Object.defineProperties(styles, {
160 value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
209 value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
213 value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
218 return styles;