- Install Module
pip install syscolorspip3 install syscolors- Import Module
from syscolors.sysColors import SystemColorsclr = SystemColors()Colors = clr.red | clr.yellow | clr.blue | clr.green | clr.magenta | clr.black | clr.white
Background Colors = clr.bgRed | clr.bgYellow | clr.bgBlue | clr.bgGreen | clr.bgBlack | clr.bgWhite
Color Reset = clr.reset
Font Formating = clr.bold | clr.underline | clr.reversedtext = clr.setColor(35)
print(text + "SetColor"+reset)#If you don't know the color numbers, you can call the getAllColor() method.
clr.getAllColor()bgColor = clr.setBgClr(202)
print(bgColor+"Background Color"+reset)#If you don't know the background color numbers, you can call the getAllBgColor() method.
clr.getAllBgColor()#Default RGB = "240;248;255" => Type(string)
color = clr.RGBSetClr("155;205;155")
print(color+"RGBSetColor Method"+reset)# RGB Background Color
#Default RGB = "240;248;255" => Type(string)
Bgcolor = clr.RGBSetBgClr("0;199;140") + clr.black
print(Bgcolor+"RGBSetBgColor Method"+reset)#detail = True =>> Returns color and rgb code if detail parameter is true.
#detail = False =>> If the parameter is False, the dictionary is returned.
print(clr.getAllRGB(detail=False))
#output _>
{'ALICEBLUE': '240;248;255', 'ANTIQUEWHITE': '250;235;215', 'ANTIQUEWHITE1': '255;239;219', 'ANTIQUEWHITE2': '238;223;204', 'ANTIQUEWHITE3': '205;192;176', 'ANTIQUEWHITE4': '139;131;120'...'YELLOW2': '238;238;0', 'YELLOW3': '205;205;0', 'YELLOW4': '139;139;0'}
print(clr.getAllRGB(detail=True))#Default HexCode = "#B12345" => Type(string)
color = clr.setHexColor("#dc143c")
print(color+"SetHexColor Method"+reset)
color = clr.setHexBg("#dc143c")
print(color+"SetHexBg Method"+reset)#Returns all hex color codes and colors.
clr.getAllHex()
#output _>