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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rich_color_ext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae083bea1fc4733732370bc7fdc4e94b2f292c3866ac47f55c00050459fcacb8
MD5 e623f258f532f95bbe378b74d5cd2138
BLAKE2b-256 9efb54fef7c597b8f7a17ffa8470f679b039c3621c69f496d212171352f74869

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rich_color_ext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a9f365ed76614b81334c67373de6aae9f01bb1fce8cd7123c3cbd6a98c7d460
MD5 71d4bfb5fe991eb7ea477d9ac009c109
BLAKE2b-256 acca0948010437290aa0661a28b002034bc5648c302375a364626fe59f0bb6a7

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