ANSI color codes work on terminals on Windows, Mac, and Linux. You can use them directly like this: console.log(String.fromCharCode(27) + '[32m;Go green!') Or, probably preferably, use a module like https://www.npmjs.org/package/ansi-color ( https://github.com/loopj/commonjs-ansi-color). I haven't tried that particular module, but a lot of others seem to use it, so it'll probably do the trick.
Colors are fun! Jimb Esser On Friday, February 7, 2014 7:41:48 AM UTC-8, Kevin Ingwersen wrote: > > The subject says it all :) > > I just wanna know if it is possible to colorize output on Windows > terminals. I am trying to find a C/C++ library to do that on Windows (and > found one actually)…but I need to do it on windows too ovo. > > Any idea? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
