This module makes it easy to set color schemes: preset and custom. Comes with 10 preset color schemes as well as an on-the-spot function to 'set' what ever scheme you want. Applies only to Windows CMD (Command Prompt)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | # color module #
# color.py #
def default():
import os
os.system("color 07")
# default CMD black background with white text
def matrix():
import os
os.system("color 0a")
# black background with bright green text
def sky():
import os
os.system("color bf")
# sky-blue background with white text
def egypt():
import os
os.system("color 0e")
# black background with yellow text
def evil():
import os
os.system("color 0c")
# black background with red text
def fire():
import os
os.system("color ce")
# red background with yellow text
def metallic():
import os
os.system("color 08")
# black background with grey text
def metal():
import os
os.system("color 80")
# grey background with black text
def gillette():
import os
os.system("color 1e")
# blue background with yellow text
def bee():
import os
os.system("color e0")
# yellow background with black text
def set(c):
import os
colorprep = "color %s" % c
color = colorprep
os.system(color)
# custom color scheme | ie. "set(4a)"
# see "color.directory()"
def directory():
import os
os.system("color color")
# displays color variables
|
This module is useful for any Windows based project. It is very easy to edit and customize new functions for new color schemes.