Skip to main content

Extend Rich with the ability to parse CSS color names and 3-digit hex colors.

Project description

rich-color-ext

rich-color-ext extends the great rich library to be able to parse 3-digit hex colors (ie. #09F) and CSS color names (ie. rebeccapurple).

Installation

uv (recommended)

uv add rich-color-ext

pip

pip install rich-color-ext

Usage

To make use of rich-color-ext all you need to do is import it.

import rich_color_ext
from rich.console import Console

console = Console()
console.print(
    Panel(
        "This is the rich_color_ext example for printing CSS named colors like, \
[bold rebeccapurple]rebeccapurple[/bold rebeccapurple] and 3-digit hex \
colors like, [bold #f0f]#f0f[/bold #f0f].",
        padding=(1,2),
    )
)

example

Made by Max Ludden

maxlogo

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

rich_color_ext-0.1.3.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rich_color_ext-0.1.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file rich_color_ext-0.1.3.tar.gz.

File metadata

  • Download URL: rich_color_ext-0.1.3.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for rich_color_ext-0.1.3.tar.gz
Algorithm Hash digest
SHA256 501296cb66d75413f29a25cee1606a1fd38ead2d95c97428e5b226d679a6ea7d
MD5 d59441ed679c1aa400e51a98c573d938
BLAKE2b-256 305474ef0e1f57b87b71a3c425dc3ba69c3a308279ffb4ed38bdeffc789f655d

See more details on using hashes here.

File details

Details for the file rich_color_ext-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for rich_color_ext-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a09915f2f58d30aa616b216d684e777c9ac8fbd80e0824408457b3e5404c06b
MD5 0ade00dec497fa3c0c7f9147b7cb2ac4
BLAKE2b-256 7e2385eb38396873b3ee89ee51ef7412ec184457baa7aec6e4e0ddf4dde2b8de

See more details on using hashes here.

Supported by

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