🎨 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 *
# Generate red text with default background
print(red_fg("Hello, World!"))
# Generate bold red text with default background
print(bold_red_fg("Hello, World!"))
# Generate high-intensity red text with default background
print(highintensity_red_fg("Hello, World!"))
# Generate high-intensity bold red text with default background
print(highintensity_bold_red_fg("Hello, World!"))
# Generate custom colored text (red: 150, green: 78, blue: 120) with default background
print(custom_fg(150,78,120,"Hello, World!"))
Background
from colorway_background import *
# Generate text with red background
print(red_bg("Hello, World!"))
# Generate text with high-intensity red background
print(highintensity_red_bg("Hello, World!"))
# Generate text with custom colored background (red: 150, green: 78, blue: 120)
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 *
# Generate red text with blue background
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 *
# Generate red text
print(f'{foreground.red}Hello, World!{format.clear}')
# Generate text with red background
print(f'{background.red}Hello, World!{format.clear}')
# Generate text with a mix of colors
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
Metadata
Release files for colorway 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colorway-2.0.0.tar.gz | 18.3 kB | Without provenance | Details for colorway-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colorway-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for colorway-2.0.0-py3-none-any.whl |
Total release size: 35.8 kB
Release files / colorway-2.0.0.tar.gz
| Download URL | colorway-2.0.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8123767802703dde1d5b9bdc2246db73b53e298883b5627639bc5b331a25ff5
|
|
BLAKE2b-256 checksum How to use checksums |
e6b5832a9338a4732d0146cf22bf41fb1aa5716428bfc4c0fd941d859c3faad2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / colorway-2.0.0-py3-none-any.whl
| Download URL | colorway-2.0.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a7c73ecdb6048eda790a8a257fce48f18a3bacf3e76a96f0702d210165cd061
|
|
BLAKE2b-256 checksum How to use checksums |
62d6e71ecbafcb54519c9b5a3d63189456d75e0ce6c0c05833fa346b6a0a8fa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for colorway 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.