Ansi colors

Back

List of colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • bright black or grey
  • bright red
  • bright green
  • bright yellow
  • bright blue
  • bright magenta
  • bright cyan
  • bright white

Codes

Color Foreground Code Background Code
black 30 41
red 31 42
green 32 43
yellow 33 44
blue 34 45
magenta 35 46
cyan 36 47
white 37 100
bright black or grey 90 101
bright red 91 102
bright green 92 103
bright yellow 93 104
bright blue 94 105
bright magenta 95 106
bright cyan 96 107
bright white 97 108

Applying the color code

Background green

\033[43m Hello World \033[m