Change the Python terminal text color.
Project description
TerminalColor
TerminalColor is used to change the color of the text displayed on the Python terminal.
Brightnesses(3/4bit) and Bit modes(8bit, 24bit)
-
dark
-
light
-
8bit
-
24bit or rgb
Colors(3/4bit)
- red
- green
- yellow
- blue
- magenta
- cyan
Text Types
- bold
- italic
- underline
3/4bit color mode
ctext(color="brightness-color_name")
8bit color mode
ctext(color="8bit-color_code")
24bit color mode
ctext(color="24bit-r;g;b")
ctext(color="rgb-r;g;b")
Example Code
from terminalcolor import ctext, cprint
"""
ctext
"""
# color
print(ctext(text="example", color="dark-blue"))
# background color
print(ctext(text="example", bg_color="light-blue"))
# single text type
print(ctext(text="example", text_type="bold"))
# multiple text type
print(ctext(text="example", text_type=["italic", "underline"]))
# 8bit color mode
print(ctext(text="example", color="8bit-231"))
# 24bit color mode
print(ctext(text="example", color="24bit-91;92;239"))
print(ctext(text="example", color="rgb-91;92;239"))
"""
cprint
"""
cprint(text="example", color="light-yellow", bg_color="dark-blue", text_type="bold")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminalcolor-1.0.3.tar.gz.
File metadata
- Download URL: terminalcolor-1.0.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad890427b314b6d12df806503e30ab185159c131f6ddf93eefc9de4ddd870bad
|
|
| MD5 |
a51bd593a0b96b8a35cc24f0624e9c17
|
|
| BLAKE2b-256 |
af00ff93029ec1c3b4fc25966b298c8ff76ce923de721bb4ccd8860d6223a7f3
|
File details
Details for the file terminalcolor-1.0.3-py3-none-any.whl.
File metadata
- Download URL: terminalcolor-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
090c904fd4ce86a6dce9f7b2ef303983adf6b81407a09f4e27f5e9099622a887
|
|
| MD5 |
74d842fc063ec11c83d348bbd4efdf02
|
|
| BLAKE2b-256 |
94e86eddf81b36c6dfe02060b6d9c3e2729fa5868f309ba78111ab1db02b64b7
|