console.log The %c Flag multiple arguments

I’m using this approach to get color in the console:

console.log('%cJesus is Lord', 'color:red')

What I want to know is:

Can you still get color when doing this?

const myObj = {a: 2}
console.log(myObj, 'color:red')

OR this?

console.log('%cJesus', '%cis my Lord', 'color:red')

If so, how? Where are the docs on the %c flag? many thanks

93 thoughts on “console.log The %c Flag multiple arguments”

Leave a Comment