Skip to main content

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


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.4.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

zyjared_color-0.5.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file zyjared_color-0.5.4.tar.gz.

File metadata

  • Download URL: zyjared_color-0.5.4.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

Hashes for zyjared_color-0.5.4.tar.gz
Algorithm Hash digest
SHA256 335fa3344c6df5951cd9881a46770d06d50207f594fdf31001731f085e9d7b25
MD5 88ae0e8e29cdb8686901109d733883df
BLAKE2b-256 a65a08c2bd11019c3c99b92026711c71beaae97f7e519f87dd2167841b0114dd

See more details on using hashes here.

File details

Details for the file zyjared_color-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: zyjared_color-0.5.4-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

Hashes for zyjared_color-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc5752de905dfae2153e408d1f786906539ebcdf5c31bbb76f59b8121398e20
MD5 bf57c224e440d42059f3bd25afb7ca63
BLAKE2b-256 a66b0e26334a15980c7773d36d36d6d5772057f73e7be9d19e99149802c170a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page