pythonwindowsterminalos.systemansi-escape

What are all the colors for os.system("color ??")


I know a couple...

example..

    os.system("colora 0a")

I was wondering what other ones there were? Thanks!


Solution

  • Color attributes are specified by TWO hex digits -- the first corresponds to the background; the second the foreground. Each digit can be any of the following values:

    0 = Black       8 = Gray
    1 = Blue        9 = Light Blue
    2 = Green       A = Light Green
    3 = Aqua        B = Light Aqua
    4 = Red         C = Light Red
    5 = Purple      D = Light Purple
    6 = Yellow      E = Light Yellow
    7 = White       F = Bright White
    

    Source: http://dosprompt.info/commands/color.asp