showing results for - "node js console colors"
Giuseppe
18 Jan 2020
1// Second argument is inserted in place of %s
2
3console.log('\x1b[36m%s\x1b[0m', 'I am cyan');  //cyan
4console.log('\x1b[33m%s\x1b[0m', stringToMakeYellow);  //yellow
5
6Reset = "\x1b[0m"
7Bright = "\x1b[1m"
8Dim = "\x1b[2m"
9Underscore = "\x1b[4m"
10Blink = "\x1b[5m"
11Reverse = "\x1b[7m"
12Hidden = "\x1b[8m"
13
14FgBlack = "\x1b[30m"
15FgRed = "\x1b[31m"
16FgGreen = "\x1b[32m"
17FgYellow = "\x1b[33m"
18FgBlue = "\x1b[34m"
19FgMagenta = "\x1b[35m"
20FgCyan = "\x1b[36m"
21FgWhite = "\x1b[37m"
22
23BgBlack = "\x1b[40m"
24BgRed = "\x1b[41m"
25BgGreen = "\x1b[42m"
26BgYellow = "\x1b[43m"
27BgBlue = "\x1b[44m"
28BgMagenta = "\x1b[45m"
29BgCyan = "\x1b[46m"
30BgWhite = "\x1b[47m"
Yannik
18 Mar 2017
1const Colors = {
2  Reset: "\x1b[0m",
3  Bright: "\x1b[1m",
4  Dim: "\x1b[2m",
5  Underscore: "\x1b[4m",
6  Blink: "\x1b[5m",
7  Reverse: "\x1b[7m",
8  Hidden: "\x1b[8m",
9
10  black: "\x1b[30m",
11  red: "\x1b[31m",
12  green: "\x1b[32m",
13  yellow: "\x1b[33m",
14  blue: "\x1b[34m",
15  magenta: "\x1b[35m",
16  cyan: "\x1b[36m",
17  white: "\x1b[37m",
18
19  BgBlack: "\x1b[40m",
20  BgRed: "\x1b[41m",
21  BgGreen: "\x1b[42m",
22  BgYellow: "\x1b[43m",
23  BgBlue: "\x1b[44m",
24  BgMagenta: "\x1b[45m",
25  BgCyan: "\x1b[46m",
26  BgWhite: "\x1b[47m",
27};
28/**
29* Colorize a string of text!
30* @param {String} text The string text to colorize
31* @param {String} options Strings of options (like "white", "red", "BgWhite", "BgRed", "Bold", "Dim", etc.)
32* @returns {String} Colored String
33*/
34function colorize(text = "", ...options) {
35  let opts = "";
36  options = options ?? "white";
37  options.forEach((opt) => {
38    opts += Colors[opt] ?? Colors.white;
39  });
40  return `${opts}${text}${Colors.Reset}`;
41}
Cali
25 Jul 2016
1Reset = "\x1b[0m"
2Bright = "\x1b[1m"
3Dim = "\x1b[2m"
4Underscore = "\x1b[4m"
5Blink = "\x1b[5m"
6Reverse = "\x1b[7m"
7Hidden = "\x1b[8m"
8
9FgBlack = "\x1b[30m"
10FgRed = "\x1b[31m"
11FgGreen = "\x1b[32m"
12FgYellow = "\x1b[33m"
13FgBlue = "\x1b[34m"
14FgMagenta = "\x1b[35m"
15FgCyan = "\x1b[36m"
16FgWhite = "\x1b[37m"
17
18BgBlack = "\x1b[40m"
19BgRed = "\x1b[41m"
20BgGreen = "\x1b[42m"
21BgYellow = "\x1b[43m"
22BgBlue = "\x1b[44m"
23BgMagenta = "\x1b[45m"
24BgCyan = "\x1b[46m"
25BgWhite = "\x1b[47m"
queries leading to this page
iterm log a color text nodejsnode js colored consolenode js console log bold texthow to get colors in console node jsnode js colors consolenpm console log colorscolores console log de nodenode js colored loggerset font color javascript terminalconsole log node colorsnodejs change color textterminal nodejs console log colorconsole node red backgroundnode console log colorsnodejs console log boldstyle console log in nodejsnodejs console log colorsconsole log colors nodejsterminal colors nodecolor console log nodenode javascript print bash redset color node jscolors terminal nodejschange color in console node jsnode how to use colors in logblue color javascript nodejscolors for console log nodejschane clour of consle log nodenode console colornode js console colorcolors node jshow to print console with given color codein nodejsnode js change console log colorbest node js color setupcolorful console log in node js javascriptcolour terminal nodejsmake string rainbow nodejsnode js console error redconsole log with colors nodenpm colors 2fsafenodejs colorsnodejs colorful console logexpress console log coloradd color when console nodejsnodejs color codesnode console log green colornodejs give color to single line console lognode js color consolepass colour input to node jserrornodejs colorschange line color in terminal node jsnode cs colorize consolehow to do color on 60 nodejsiterable printin colors nodejshow to print colored messages in terminal node jswrite colorful node jsnode colorsnpm console print in colorconsole response color and backgroundnodejs colornode working with colornode js colored console outputhow to use color in node consoleconsole log node js colorred text nodejshow to make nodejs change color in cmdjavascript nodejs number colorhow to add color for specific test in console log in terminalhow to change color in terminal node jsnpm console log colornode js with color codingnodejs change console log colorhow to console log green paraaragraph node jscolors for node jsnode js color console log messagesjs console colors node jscoloring dynamic value console loghow to console log in different color node jsturquoise console log nodejsnode colors in consolenode js console colorsnode color terminalconsole log terminal color onlinebold color nodejsconsole color node jsexpress js colornodejs log with colorinstall colors frop node js in windowsput text in color nodejsnodejs color consolecolour console node jsconsole log colors nodejsnpm console log colorcolor full console nodejsprint console in a different color javascript terminalljavascript change stdout text colourcolors nodejszxnode js color logwrite into file with color in node jshow to bold terminal color nodjesnode js console boldconsole error redjs util transform colorcolor nodejs consoleconsole color js npmadd color to consolelog terminalcolor console nodejs 27default grey background node js apphow console in color in terminalhow to import colors in console with import in node jsnode color text in consolenode log colornodejs console colourspress click when see a color nodejshow to send colored logs nodejscolor console nodecolors nodejs yellow showing as rednode js color console logjavascript console colors requirecolors node jsnode js color codechange color of cmd results node jscolored console log nodejsnode write colors to consolenodejs change server color consolenode js text color rednodejs color console log node 12 18fontsize in colors npmcolor code in nodejs consolenode colorinconsole log color nodejsfgcolor color in node jsconsole log in javascript with colornode js console text colorunderline console log node js node js colorscolor node console lognodejs console log colorsnode print in colornpm cloration consolenode write in color in consolenode color colorfull message terminal nodejscolored string node jscolors for consnonle log nodejsconsole log terminal text color instead of background colornode js custom color in terminal outputcolors in console nodejavascript console log color terminaljavascript change node js console colorhow to change font color in node jscolor print with node jsjavascript console log change font color in terminalnodejs console log output colorhow to sample color from your screen node jscolors in node jsconsole color nodejsnode console color textcolcor in nodejs loguse colors on console nodejsconsole log color node jsnode js page changeing colors from restapi datacolor in node red consolenode js color console outputgreen color console nodejsnode console log colorsterminal colors node jsyellow color node jsnode console log objects with colorsnodejs console log with colorprint colored on terminal nodenode js write in colorsnode js change text colorterminal colors jsconsole log in color nodecolorize console log nodenpm console log colorsconsole log with colors cmdnode color consolenode inspect colorized syntaxcolors cli nodejsnode colored outputhow to change text color in node jsnode js colorconsole log color nodejs console colorsnode console boldjavascript terminal dark bluewhite text node jsnodejs color first word console lognodejs color console outputcolor nodenode js colorstyle console messages node jsconsole log colors nodejs colors log nodejsnodejs colors consolenodejs color text outputcolor node jshow to change console color node jsnodejs how to use colors in consolenode console colors greycolor nodejs console lognode js console colorsnode js console color codescolorize console log npmstdout with color jscolor console nodejsconsole log different colours nodejscolor node js consolechange background color in console nodejsjavascript console log color node js scriptnodejs terminal print boldconsole error colornode font x1bconsole colors nodejscolor in consoel log npmmake color console nodejsnodejs color console log then resethow to color console errorsnodejs color console logjavascript console color text nodestrings are not colored node jslog with color nodehow to send message to the terminal with color in javascripthow to colour out scripts in node jsadd color to console log nodenode js console color and boldcolor code function in node jsnode js colored output to user servercolor stdout nodejsconsole color codes nodejsnode terminal console log colornodejs change colour of console logforeground color text nodjsconsole colors nodenode js colored textnode js change colorconsole log color terminalcolours node jsconsole log in node redchange terminal color console lognode js change console colorcolored console log nodejsnpm console colorsnode js log colornode module showing in graymake different colors console in terminalnode console color codeschange text color node jscolors nodejsconsole log colored in nodejs consolecolored log object nodejshow to give color to console statement in node jsterminal console log stringlog with colors nodejsnodejs terminal colorscolor console warn nodejsjs use color in console node jshow to do color on 60 node jsnode color in console outputcolor text in console node jsnodejs console color codesnode js console terminal color how to show in nodejs console a red cross sine and a green tick sinenode ste console log colourjavascript console log color nodejsbgred string console log jsconsole change color nodejsnode js page colorcolor console text nodecolorful console log node jsnodejs cmd console color supportjavascript string color terminalconsole log colors nodehow to color console statements in nodejshow to import colors in console with import on node jsnodejs console colorsprint colors npmcolors in terminal using console node jscolor console log cmdnode js console error colorconsole log colors ndoejsnode js log with colorcolour terminal node jshow to make color chat in npmcolored text node js printhow to change termial line color using nodenode js console colorwrite file with color in node jscolors in console log nodejsnodejs print console with colorscolorful console nodesend red color error to npm cli from jsnode change color of console outputnode set console color back to normal in console loggettin color message in console nodenode color mesages console nodenodejs console background colornodejs 2c 2c 2c log with colornodejs colorssdifferent colours in console nodenode js terminal colorsnodejs console log colorconsolelog color nodejshow to set colors in nodejshow to make different colors node js consolenode js colored logger multiple colorsconsole node colornodejs collors in console outputmake color to console log nodejsnode add color to consolehow to log grey text in console nodejsget color there node jsnodejs text yellowchange color of console log nodelog color nodejsconsole log with color nodejscolor in a string nodejsnode js console message colornode console log green errorconsole log color terminalnode change color of console log after logcolored console nodejscolorful console logs in nodemake terminal console color nodecolorfull console log nodejsstdout font colour in javascriptcolor in console log node jsconsole log with color in nodenodejs change colors of console log and resetterminal colors node ksnode console error colornode js color terminal outputjvacript typescript how to add color to console loghow to know what are total no of colors present using node jsnode soncole lgo colornodejs color console lognodejs color logconsole log in green color in nodejsconsole log in color mac terminalnode console log colorconsole colors npmcolor console log nodejscolored text nodejscolor output in nodenpm console colornodejs color sequncenode js textcolornodejs console with colornode cli console rednode cli color redchange text color in node jsred node js console colornode js color codescorlor console nodejsnode console text colorwhat cors do node jsexpress js color textcolored console log nodenode terminal colorsconsole color text node jsnode js console bold textuse a colerful log in nodejscolor message in file with nodehow to collour in nodejs consoledo colors in node js consoleconsole error colorconsole log in different colors node jsconsole log terminal colorjs stdout string colorsconsole log colors node jsjavascript console color textnode js colorsacces console in heavy nodenode consol colorsconsole color nodenodejs comment colorscolors console log nodejssend colored text console log node jsconsole log node in colornode console colorsnodejs console log colornodejs console coloradding console log color in your terminalnode colored consolecolors in cmd nodejsnodejs color cyclenodejst terminarl logs colornode js console log colorconsole log color nodecolor codes node jsterminal console log colornode js console log colorhow to print messsage in red color in nodenodejs cololrshow to do colored text in typescript terminal change colour of nodejs command prompt textnode js change color of console textnode console log red colorcolored text in console jscolors console log nodenodejs change console colorjavascript console log with color nodenode js require colorsnode console log colourscolorer le console nodejsconsole log colors in nodejsnodejs color npm consolegreen console color node jsnode console package with colornodejs red textconsole text color nodeadd color to console log output linuxconsole warn color nodecolored text nodenodejs console output colornode js set console output colorsconsole log colors in nodecolor code function in nodejsnode js colorde consolenode js color functionshow to print colorful output nodejs clinode color changerconsole red color nodejsnode js console colors objectnode js text colorconsole logging color api nodejs 22 5cx1b 5b4m 22 console fontnodejs fancy color outputtconsole colored loggers node jsconsole log highlight cli nodenode console log boldnpm string ansi colornode console log colornode js console log green colorcolors node js console logcolors in node js consolenodejs color text in terminalnode js colored outputput color in node console logblue console color nodejsnode js chuck for color consoleconsole log color nodejsnode stdout colornodejs change colour of console log and resetconsole log colors command linex1b console font nodeproccess title color nodehow to import colors in console in node js with es6 importsnodejs console log coliorcolored text nodejs printconsole log with colors nodejsnpm style wrong colorsnode js colorize consoleconsole color in node jscolours nodejsnodejs colour console textcoloris console nodejavascript console log green in terminalcolors nodenode colour console nodejs cmd color frameworkpass colour to node jsuse color console log nodejsconsole log in different colors nodenode js cmd colorchange color in comman line in node scriptshow to make colors in node js node js colorscolors node consolecolor console log nodeconsole log color node jscolors in nodejsnode js console log with colornode console log color greennodejs set console color outputdiscord js console colornode js rainbow color in terminal outputconsole log node js with colorconsole log terminal colorhow to green colour text in nodejs console logchange console log color nodenode js console greennode js console log colorsnode how to change consol log colornodejs change color of console log and resethow to do colourful console logs in node jsnode js console colors