colored text in console.log code example

Example 1: console.log with color font

console.log("%cThis is a %cConsole.log", "background:black ; color: white", "color: red; font-size:25px");

Example 2: 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);

Example 3: console.log with color font

console.log("%cThis Is Line One ", "font-size:30px");o

Tags:

Misc Example