js console log with color
console.log('%c Oh my heavens! ', 'background: #222; color: #bada55');
js console log with color
console.log('%c Oh my heavens! ', 'background: #222; color: #bada55');
console.log color terminal
Reset = "\x1b[0m"
Bright = "\x1b[1m"
Dim = "\x1b[2m"
Underscore = "\x1b[4m"
Blink = "\x1b[5m"
Reverse = "\x1b[7m"
Hidden = "\x1b[8m"
FgBlack = "\x1b[30m"
FgRed = "\x1b[31m"
FgGreen = "\x1b[32m"
FgYellow = "\x1b[33m"
FgBlue = "\x1b[34m"
FgMagenta = "\x1b[35m"
FgCyan = "\x1b[36m"
FgWhite = "\x1b[37m"
BgBlack = "\x1b[40m"
BgRed = "\x1b[41m"
BgGreen = "\x1b[42m"
BgYellow = "\x1b[43m"
BgBlue = "\x1b[44m"
BgMagenta = "\x1b[45m"
BgCyan = "\x1b[46m"
BgWhite = "\x1b[47m"
how to change the color of a console.log in javascript
// Download the npm package "colors"
// npm i colors
var colors = require("colors");
console.log("Hello World".blue);
// output: Hello World (Its blue btw lmao)
console.log with color font
var colors = require('colors');
console.log('i am black'.bgBlack);
console.log('i am red'.bgRed);
console.log('i am green'.bgGreen);
console.log('i am black'.bgYellow);
console.log('i am blue'.bgBlue);
console.log('i am magenta'.bgMagenta);
console.log('i am cyan'.bgCyan);
console.log('i am white'.bgWhite);
console.log with color font
var colors = require('colors');
console.log('This is bold'.bold);
console.log('This is dim'.dim);
console.log('This is italic'.italic);
console.log('This is underline'.underline);
console.log('This is inverse'.inverse);
console.log('This is hidden'.hidden);
console.log with color font
var colors = require('colors');
console.log('This is rainbow'.rainbow);
console.log('This is zebra'.zebra);
console.log('This is america'.america);
console.log('This is trap'.trap);
console.log('This is random'.random);
console.log('This is random2'.random);
console.log('This is random3'.random);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us