Can Chrome\'s built-in JavaScript console display colors?
I want errors in red, warnings in orange and console.log
\'s in green. Is that possible?
Google has documented this https://developers.google.com/web/tools/chrome-devtools/console/console-write#styling_console_output_with_css
The CSS format specifier allows you to customize the display in the console. Start the string with the specifier and give the style you wish to apply as the second parameter.
One example:
console.log("%cThis will be formatted with large, blue text", "color: blue; font-size: x-large");