Color your Python terminal screen as you wish.
Project description
SysColors
How to use ?
1-) Module Install and Import
- Install Module
pip install syscolors
pip3 install syscolors
- Import Module
from syscolors.sysColors import SystemColors
2-) proxyController class must be called.
clr = SystemColors()
3-) Default colors and Font Formating
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.reversed
4-) Outputs
Code | Output |
---|---|
print(clr.red + "Red Color") |
|
print(clr.yellow + "Yellow Color") |
|
print(clr.blue + "Blue Color") |
|
print(clr.green + "Green Color") |
|
print(clr.magenta + "Magenta Color") |
|
print(clr.black + "Black Color") |
|
print(clr.white + "White Color") |
|
print(clr.bgRed + "Red Background Color") |
|
print(clr.bgYellow + "Yellow Background Color") |
|
print(clr.bgBlue + "Blue Background Color") |
|
print(clr.bgGreen + "Green Background Color") |
|
print(clr.black + "Black Background Color") |
|
print(clr.white + "White Background Color") |
|
print(clr.bold + "Font Style Bold") |
|
print(clr.underline + "Font Style Underline") |
|
print(clr.reversed + "Font Style Reversed") |
5-) setColor() and setBgClr() Methods
text = clr.setColor(35)
print(text + "SetColor"+reset)
output _>
#If you don't know the color numbers, you can call the getAllColor() method.
clr.getAllColor()
output2 _>
bgColor = clr.setBgClr(202)
print(bgColor+"Background Color"+reset)
output3 _>
#If you don't know the background color numbers, you can call the getAllBgColor() method.
clr.getAllBgColor()
output4 _>
6-) RGBSetClr() and RGBSetBgClr() Methods
#Default RGB = "240;248;255" => Type(string)
color = clr.RGBSetClr("155;205;155")
print(color+"RGBSetColor Method"+reset)
output Default _>
output set color _>
# RGB Background Color
#Default RGB = "240;248;255" => Type(string)
Bgcolor = clr.RGBSetBgClr("0;199;140") + clr.black
print(Bgcolor+"RGBSetBgColor Method"+reset)
output Default BG _>
output set BgColor _>
Use getAllRGB() Method
#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))
output getAllRGB > True _>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syscolors-0.0.1.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for syscolors-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e29c1d340ed816bd1b71e1f27dd56eda70e91091697f8bf58c4e080ae002989 |
|
MD5 | 82caca5ed07c097640b2e7dbafda6b27 |
|
BLAKE2b-256 | 6e62aa51a7b21b705149ee6164b8af8d19e1dd7312effd0313f0a382a1d43372 |