🎨 Colorway
Python package to change the text color of the python console.
📦 Installation
Run the following to install:
$ pip install colorway
🚀 Usage
Foreground
from colorway_foreground import *
print(red_fg("Hello, World!"))
print(bold_red_fg("Hello, World!"))
print(highintensity_red_fg("Hello, World!"))
print(highintensity_bold_red_fg("Hello, World!"))
print(custom_fg(150,78,120,"Hello, World!"))
Background
from colorway_background import *
print(red_bg("Hello, World!"))
print(highintensity_red_bg("Hello, World!"))
print(custom_bg(150,78,120,"Hello, World!"))
Foreground & Background
You can use foreground formatting and background formatting by placing them in each other.
from colorway_foreground import *
from colorway_background import *
print(red_fg(blue_bg("Hello, World!")))
Manual
You can also use the manual package to manually format parts of strings.
from colorway_manual import *
print(f'{foreground.red}Hello, World!{format.clear}')
print(f'{background.red}Hello, World!{format.clear}')
print(f'{foreground.red}Hello, {background.blue}World!{format.clear}')
Available colors
The colors available to use are:
- ⬛ Black
- 🟥 Red
- 🟩 Green
- 🟨 Yellow
- 🟦 Blue
- 🟪 Purple
- 🟦 Cyan
- ⬜ White
Note
Please be aware that you can not combine foreground and background formatting if you use high-intensity colors.
Please be aware that custom colors may not be supported by all terminal outputs.
👨💻 Developing Colorway
To install colorway, along with the tools you need to develop and run tests, run the following in your virtualenv:
$ pip install -e .[dev]
🚦 Development Progress
Stable Development