Personal font color utility library for Python
Project description
zyjared-color
Personal font color utility library for Python, primarily used in PowerShell.
Installation
pip install zyjared-color
Usage
Basic Usage
Create a styled text using the Color
class:
text = Color('Hello World!').red().bold()
print(text)
You can achieve the same result using ColorStatic
class methods:
from zyjared_color import ColorStatic as Colors
text = Colors.red('Hello World!').bold()
print(text)
Or using convenience functions for styles:
from zyjared_color import red, bold, italic
text = red('Hello World!').bold()
print(text)
text = italic(text)
print(text)
Chaining Usage
You can chain multiple style methods together:
from zyjared_color import red
text = red('Hello World!').bold().italic().underline().through()
print(text)
Nested Usage
Combine different styling methods and functions:
from zyjared_color import red, bold, italic, underline, through, blue
text = through(underline(italic(bold(red('Hello World!')))))
print(text)
# add more text
text = text + ' !!! ' + blue('Hello World!')
print(text)
# change text color
text.yellow()
print(text)
All Styles
You can view all styles through the ColorStatic
class method.
styles
bold
dim
italic
underline
through
reverse
blink
blink_fast
hidden
frontground
black
red
green
yellow
blue
magenta
cyan
white
bright_black
bright_red
bright_green
bright_yellow
bright_blue
bright_magenta
bright_cyan
bright_white
background
bg_black
bg_red
bg_green
bg_yellow
bg_blue
bg_magenta
bg_cyan
bg_white
bg_bright_black
bg_bright_red
bg_bright_green
bg_bright_yellow
bg_bright_blue
bg_bright_magenta
bg_bright_cyan
bg_bright_white
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
zyjared_color-0.3.0.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file zyjared_color-0.3.0.tar.gz
.
File metadata
- Download URL: zyjared_color-0.3.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b839465bd165f16b7545496810431f8307c30c93ca06fa53bcab6960185f917 |
|
MD5 | f6307475c75d4230dd0488052f15d96a |
|
BLAKE2b-256 | 35beaf33a4401a561c64efa20bdefe39620b6d242f10a0271264f6a20c523182 |
File details
Details for the file zyjared_color-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: zyjared_color-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c2d35e88d8879623a36562f16bec3762dab1388490bb93141cd33a026af04e8 |
|
MD5 | 714d9982490ee90085443f57192fbafa |
|
BLAKE2b-256 | d2115b9b84156f40bfb5a74304b4f466074bc454f5d18a2f0a66aa1d2987dc5f |