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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: zyjared_color-0.5.3.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.3.tar.gz
Algorithm Hash digest
SHA256 62112c74af3da4c409fc9f17782630ed1e39044ea2bd16b6ad975f7c415a3e74
MD5 eee4f9671627853b86464c7f73e92291
BLAKE2b-256 9e1273572a9d60144a04ce7967f176be1b97171cc0bc0e03d5f87f6f88b82c1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zyjared_color-0.5.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 16cc18a875026f0946d67dde5d069e9fe38bcda1896e89c92983050fd80f48c0
MD5 2480b9af195de35f579ed966251ab90d
BLAKE2b-256 0d92418d8f429d5b4a38eade9551341c94787c01655cf7eb3a42cc7c0c86d1c9

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