Lines Matching defs:const
0 const ANSI_BACKGROUND_OFFSET = 10;
3 const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
5 const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
7 const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
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);
71 export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
74 const codes = new Map();
76 for (const [groupName, group] of Object.entries(styles)) {
77 for (const [styleName, style] of Object.entries(group)) {
136 const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
147 const integer = Number.parseInt(colorString, 16);
184 const remainder = code % 36;
191 const value = Math.max(red, green, blue) * 2;
221 const ansiStyles = assembleStyles();