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.1.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file zyjared_color-0.3.1.tar.gz
.
File metadata
- Download URL: zyjared_color-0.3.1.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 | 0b0efef648dbb6ff7e7308d4192157cc148434eb827e7eb2642c143970626444 |
|
MD5 | 72de50e6de043761a7752246990150ac |
|
BLAKE2b-256 | fd7e5a24502cd8bef17264077c9e8141f613747a69b37f15a6ede563c5881657 |
File details
Details for the file zyjared_color-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: zyjared_color-0.3.1-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 | 1063e31fffba9729032ef6d20386087f11afa3f349663340b3cd0d1eaf2cd726 |
|
MD5 | d66612469b53d5b727bbdbc308c0b53c |
|
BLAKE2b-256 | 172a117ce9dcb84903d1e0afc1a0cefab8d99ccacadb9f45fde615afb5ab75d2 |