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),
)
)
Made by Max Ludden
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae083bea1fc4733732370bc7fdc4e94b2f292c3866ac47f55c00050459fcacb8
|
|
| MD5 |
e623f258f532f95bbe378b74d5cd2138
|
|
| BLAKE2b-256 |
9efb54fef7c597b8f7a17ffa8470f679b039c3621c69f496d212171352f74869
|
File details
Details for the file rich_color_ext-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rich_color_ext-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a9f365ed76614b81334c67373de6aae9f01bb1fce8cd7123c3cbd6a98c7d460
|
|
| MD5 |
71d4bfb5fe991eb7ea477d9ac009c109
|
|
| BLAKE2b-256 |
acca0948010437290aa0661a28b002034bc5648c302375a364626fe59f0bb6a7
|