Closed jjhesk closed 6 years ago
Yeah, try something like log.bgBrightYellow.green ('foo')
. You can look up names of the styling functions here: https://github.com/xpl/ansicolor#supported-styles
You can also use your favourite ANSI styling library, like Chalk or ansicolor (ololog uses Ansicolor internally) to color selected parts of the string, like this:
ansi = require ('ansicolor')
log ('foo' + ansi.bgRed ('bar') + 'baz')
or like this (it is not recommented, as it extends the built-in String prototype, but you still may find it useful):
require ('ansicolor').nice
log ('foo' + 'bar'.bgRed + 'baz')
thanks for the fast reply, yup. i will try. thanks for the awesome lib
Feel free to ask questions :) I'm closing this issue for now.
is that possible to get a background color for the printed string? how to achieve this effect?