Personal font color utility library for Python
Project description
zyjared-color
Personal font color utility library for Python.
Installation
pip install zyjared-color
Usage
from zyjared_color import color, Color
content: Color = color('Hello World!').red() + ' --- test'
text: str = f'{color("Hello World!").blue():<15} -+-+-+- test'
content: Color = color(text)
HTML / CSS
from zyjared_color.html import ColorHtml, StaticColorHtml
from zyjared_color.html import blue, red, bold, italic, underline, through
text = ColorHtml('Hello World!').red().bold()
print(text)
# custom styles
text = ColorHtml("Hello World!", {"opacity": 0.5, "font-weight": "bold"})
print(text)
example: Display ColorHtml
in Jupyter Notebook
from zyjared_color.html import ColorHtml as Color, StaticColorHtml as StaticColor
from zyjared_color.html import blue, red, bold, italic, underline, through
from IPython.display import display, HTML
text = Color('Hello World!').red().bold()
# f'{text}' or str(text)
display(HTML(f'{text}'))
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.5.2.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file zyjared_color-0.5.2.tar.gz
.
File metadata
- Download URL: zyjared_color-0.5.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c07bcd30be0f6199cc3fef4e90aa8f6b9b61d1e0c023be2749ac0b4028569ff |
|
MD5 | 003424a033599e72d5404babae46a4f4 |
|
BLAKE2b-256 | a5bb72f31bb832ff8a370b0db84921e6c172705ab4db5d290808c65dcb4d7d27 |
File details
Details for the file zyjared_color-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: zyjared_color-0.5.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2102d9ae8bdcb4dc4d0702e546aa59c8e02e75fa528d6f0021e327434906c0a2 |
|
MD5 | 85bf6d4cd8a6e82ba98114c178ab3b44 |
|
BLAKE2b-256 | a0b8b7537871c2572567e9353418403a07a833b160d60e56c2355ef6a09032b7 |