// Make console colors // based on what I found here: // https://www.kindacode.com/article/node-js-colorizing-console-log-output/ // color chart found here: // https://en.m.wikipedia.org/wiki/ANSI_escape_code#Colors // // red // console.log('\x1b[31m%s\x1b[0m', 'I am red') // // green // console.log('\x1b[32m%s\x1b[0m', 'I am green') // // yellow // console.log('\x1b[33m%s\x1b[0m', 'I am yellow') // // blue // console.log('\x1b[34m%s\x1b[0m', 'I am blue') // // magenta // console.log('\x1b[35m%s\x1b[0m', 'I am magenta') // // cyan // console.log('\x1b[36m%s\x1b[0m', 'I am cyan') const wrtColorRed = (text) => { console.log('\x1b[31m%s\x1b[0m', text) } const wrtColorGreen = (text) => { console.log('\x1b[32m%s\x1b[0m', text) } const wrtColorYellow = (text) => { console.log('\x1b[33m%s\x1b[0m', text) } const wrtColorBlue = (text) => { console.log('\x1b[34m%s\x1b[0m', text) } const wrtColorMagenta = (text) => { console.log('\x1b[35m%s\x1b[0m', text) } const wrtColorCyan = (text) => { console.log('\x1b[36m%s\x1b[0m', text) } const wrtErr = (text) => { //Black on Red console.log('\x1b[30;41m%s\x1b[0m', text) } const wrtWarn = (text) => { //Black on Red console.log('\x1b[30;43m%s\x1b[0m', text) } const wrtTest = (text) => { // Green on Black console.log('\x1b[92;100m%s\x1b[0m', text) } module.exports = { red: wrtColorRed, green: wrtColorGreen, yellow: wrtColorYellow, blue: wrtColorBlue, magenta: wrtColorMagenta, cyan: wrtColorCyan, err: wrtErr, warn: wrtWarn, test: wrtTest, }