Check out example codes for "how to add syntax highlighting to node.js console". It will help you in understanding the concepts better.

Code Example 1

Black: \u001b[30m.
Red: \u001b[31m.
Green: \u001b[32m.
Yellow: \u001b[33m.
Blue: \u001b[34m.
Magenta: \u001b[35m.
Cyan: \u001b[36m.
White: \u001b[37m.

Learn ReactJs, React Native from akashmittal.com