Metadata-Version: 2.4
Name: rich-color-ext
Version: 0.1.0
Summary: Extend Rich with the ability to parse CSS color names and 3-digit hex colors.
Author-email: Max Ludden <dev@maxludden.com>
License: MIT
Keywords: 3-digit hex,color,color names,css,hex,rich
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Python: >=3.13
Requires-Dist: pytest>=8.4.0
Requires-Dist: rich>=14.0.0
Description-Content-Type: text/markdown

# rich-color-ext

`rich-color-ext` extends the great [rich](http://GitHub.com/textualize/rich) library to be able to parse 3-digit hex colors (ie. <span style="color:#09f">`#09F`</span>) and CSS color names (ie. <span style="rebeccapurple">`rebeccapurple`</span>).

## Installation

### uv (recommended)

```shell
uv add rich-color-ext
```

### pip

```shell
pip install rich-color-ext
```

## Usage

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

```python
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](example.svg)

Made by Max Ludden

![maxlogo](https://raw.githubusercontent.com/maxludden/maxludden/refs/heads/gh-pages/Images/maxlogo.svg)
