rich-style
A Python library for creating and applying full-color, linear, and circular gradients to text with easy color management. Includes utilities for ANSI styling, colored prints, and more.
Features
- Text Styling: Bold, italic, underline, strikethrough, bullet lists, and more.
- Color Management: Use named presets, custom RGB, gradients, and HSL/HTML color parsing.
- Gradients: Linear and circular gradients for text.
- ANSI Support: Automatically detects terminal support for ANSI escape codes.
- Utility Prints: Info, warning, error, success, timed, and mutable prints with color.
- Composable: Combine styles and colors easily.
Installation
pip install rich-style
Usage
Basic Styling
from rich_style import bold, italic, underline, strikethrough
print(bold("Bold text"))
print(italic("Italic text"))
print(underline("Underlined text"))
print(strikethrough("Strikethrough text"))
Bullet Lists
from rich_style import bullet_list, bold
tasks = [
"Complete report",
"Send email to client",
"Buy groceries"
]
print(bold("Task List:"))
print(bullet_list(*tasks))
Colors and Gradients
from rich_style import presets, foreground, background
print(foreground(presets.red, "Red text"))
print(background(presets.blue, "Text with blue background"))
Colors and Gradients
from rich_style import presets, foreground, background
print(foreground(presets.red, "Red text"))
print(background(presets.blue, "Text with blue background"))
Rainbow Text
from rich_style import rainbow_text
print(rainbow_text("This is a rainbow text message."))
Utility Prints
from rich_style import info, success, warn, error, timed_print
info("This is an informational message.")
success("This is a success message.")
warn("This is a warning message.")
error("This is an error message.")
timed_print("This is a timed print message.")
Mutable Print
from rich_style import mutable_print
from time import sleep
mutable = mutable_print("Loading")
sleep(1)
mutable("Still loading...")
sleep(1)
mutable("Done!\n")
Examples
See the examples/ directory for more usage examples.
Credits
License
This project is licensed under the MIT License.
Metadata
Release files for rich-style 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rich_style-1.1.6.tar.gz | 11.0 kB | With provenance | Details for rich_style-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rich_style-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for rich_style-1.1.6-py3-none-any.whl |
Total release size: 28.4 kB
Release files / rich_style-1.1.6.tar.gz
| Download URL | rich_style-1.1.6.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
511b570cdb2f034efd14f141852c47a254ac5cf7a157146a1f017cc179c3de01
|
|
BLAKE2b-256 checksum How to use checksums |
1444d0aa1ae15a98cf5175ef6993c1cf1c385ca4b471f36c6f9298a1f8ec851f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logRelease files / rich_style-1.1.6-py3-none-any.whl
| Download URL | rich_style-1.1.6-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fc89a36d594ddd1984bda9bd8ea0186c034ea4d2129c778610edd9a67e6aaa5
|
|
BLAKE2b-256 checksum How to use checksums |
13b5ce04a9d70c1f8b5b084d20ab074152bfd049865b22d2a3d249cae2006d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logSecurity for rich-style 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rich_style-1.1.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 11, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.