Skip to content

Instantly share code, notes, and snippets.

@upsilun
Last active March 17, 2024 11:19
Show Gist options
  • Save upsilun/4a85ab3bc7cf92e8acde720c6eb7ddea to your computer and use it in GitHub Desktop.
Save upsilun/4a85ab3bc7cf92e8acde720c6eb7ddea to your computer and use it in GitHub Desktop.
🎨 ANSI Codes for text formatting.
"\033[0m" // Reset all text attributes to default
"\033[1m" // Bold on
"\033[2m" // Faint off
"\033[3m" // Italic on
"\033[4m" // Underline on
"\033[5m" // Slow blink on
"\033[6m" // Rapid blink on
"\033[7m" // Reverse video on
"\033[8m" // Conceal on
"\033[9m" // Crossed-out on
"\033[22m" // Bold off
"\033[23m" // Italic off
"\033[24m" // Underline off
"\033[25m" // Blink off
"\033[27m" // Reverse video off
"\033[28m" // Conceal off
"\033[29m" // Crossed-out off
// Text color
"\033[30m" // Set text color to black
"\033[31m" // Set text color to red
"\033[32m" // Set text color to green
"\033[33m" // Set text color to yellow
"\033[34m" // Set text color to blue
"\033[35m" // Set text color to magenta
"\033[36m" // Set text color to cyan
"\033[37m" // Set text color to white
"\033[39m" // Reset text color to default
// Background color
"\033[40m" // Set background color to black
"\033[41m" // Set background color to red
"\033[42m" // Set background color to green
"\033[43m" // Set background color to yellow
"\033[44m" // Set background color to blue
"\033[45m" // Set background color to magenta
"\033[46m" // Set background color to cyan
"\033[47m" // Set background color to white
"\033[49m" // Reset background color to default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment