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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rich_color_ext-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9fefc6c0bf2e97cdc75ad887e3c45da1d4b90f31ce9b95b87ca40ba15afaab5
MD5 cc342bcadae77f1bf7ba402bfb5e1a99
BLAKE2b-256 7a39100088a2d3f10e1f76149c9039edd7c10903222cb8d4d1e7bf82992fa859

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rich_color_ext-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4304ea0db74ede07e8412cef299e1f392926b50e360c1b0dabdbadba41323a1
MD5 ef13a863c2415bc66bfaf7b0e4052e80
BLAKE2b-256 9113a2c20e03fd2d3cb2af6bd861acc2a484aab0f7d2a1e58ed4522b52909ca4

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