Approach: The ANSI escape codes help change/specify the color of the output in the console. The color of the output of the console can be changed by adding these escape codes just before the actual text.
/*Codes for different Colors*/ black = "\x1b[30m" red = "\x1b[31m" green = "\x1b[32m" yellow = "\x1b[33m" blue = "\x1b[34m" magenta = "\x1b[35m" cyan = "\x1b[36m" white = "\x1b[37m"
Note: The above task can be simplified by adding a custom helper function in the script which can be invoked with the color and data to be displayed in the console.
My Personal Notes arrow_drop_up
Please Login to comment...