UNPKG

chromafx

Version:

CHROMAFX is a powerful and flexible terminal color and style management library. It offers a wide range of color options, including basic, bright, background, and 256-color palette support, as well as custom RGB colors. The package allows easy application

73 lines (68 loc) 2.66 kB
const c = require('./source/index'); // Function to log all color examples const logColorExamples = () => { console.log(c.black('black')); console.log(c.red('red')); console.log(c.green('green')); console.log(c.yellow('yellow')); console.log(c.blue('blue')); console.log(c.magenta('magenta')); console.log(c.cyan('cyan')); console.log(c.white('white')); console.log(c.brightBlack('brightBlack')); console.log(c.brightRed('brightRed')); console.log(c.brightGreen('brightGreen')); console.log(c.brightYellow('brightYellow')); console.log(c.brightBlue('brightBlue')); console.log(c.brightMagenta('brightMagenta')); console.log(c.brightCyan('brightCyan')); console.log(c.brightWhite('brightWhite')); console.log(c.orange('orange')); console.log(c.pink('pink')); console.log(c.purple('purple')); console.log(c.brown('brown')); console.log(c.lightBlue('lightBlue')); console.log(c.lightGreen('lightGreen')); console.log(c.lightCyan('lightCyan')); console.log(c.lightRed('lightRed')); console.log(c.lightMagenta('lightMagenta')); console.log(c.lightYellow('lightYellow')); console.log(c.gray('gray')); console.log(c.darkGray('darkGray')); console.log(c.gold('gold')); console.log(c.silver('silver')); console.log(c.olive('olive')); console.log(c.teal('teal')); console.log(c.violet('violet')); console.log(c.coral('coral')); }; // Function to log all background examples const logBackgroundExamples = () => { console.log(c.bgBlack('bgBlack')); console.log(c.bgRed('bgRed')); console.log(c.bgGreen('bgGreen')); console.log(c.bgYellow('bgYellow')); console.log(c.bgBlue('bgBlue')); console.log(c.bgMagenta('bgMagenta')); console.log(c.bgCyan('bgCyan')); console.log(c.bgWhite('bgWhite')); console.log(c.bgBrightBlack('bgBrightBlack')); console.log(c.bgBrightRed('bgBrightRed')); console.log(c.bgBrightGreen('bgBrightGreen')); console.log(c.bgBrightYellow('bgBrightYellow')); console.log(c.bgBrightBlue('bgBrightBlue')); console.log(c.bgBrightMagenta('bgBrightMagenta')); console.log(c.bgBrightCyan('bgBrightCyan')); console.log(c.bgBrightWhite('bgBrightWhite')); }; // Function to log all style examples const logStyleExamples = () => { console.log(c.bold('bold')); console.log(c.italic('italic')); console.log(c.underline('underline')); console.log(c.strikethrough('strikethrough')); }; // Run all the examples logColorExamples(); logBackgroundExamples(); logStyleExamples();