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.2.tar.gz (19.5 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.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rich_color_ext-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f10801d7bbb5c210f9d197d83f406859aa9435135f17cf70b6c96ed73dad664f
MD5 c5568d0f25e48c90e6fa9ca9397ca024
BLAKE2b-256 fb431953c763bd90a83ef13b3a6d2f4bbc6ebb189a7f04af053277fb121d580b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rich_color_ext-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cdb5928664d96f558b080933bd7fd7e63e8d35c5bb10de656cb75f4965ea5653
MD5 45cb25c7397f526cc0d745c72d1bbc9b
BLAKE2b-256 1c692c82f4738b2deee1bdb1215a2a9fd6ec4f5faed5b4ec91249433b8b2afc1

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