MaxGradient automates the printing gradient colored text to the console.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
MaxGradient automates the printing gradient colored text to the console. It's built upon the great rich library. It contains a Console that can serve as a drop in replacement for rich.rich.Console and has an expanded Color class which can parse X11 color names on top of rich's standard colors. MaxGradient is a work in progress and I'm open to any suggestions or contributions.
Installation
MaxGradient can be installed from PyPi using your favorite package manager:
PDM (Recommended)
Pip
Usage
Basic Usage
The basic usage is to create a console object and use it to print gradient text:
Gradient
You may also instantiate a Gradient Object. The Gradient class is a subclass of the rich.text.Text class, and can be used in the same way. The Gradient class has a few extra arguments available though.
The Gradient class can utilize the above arguments to get a plethora of different gradients.
Color
The final main component of MaxGradient is expanding the rich.color.Color class. The MaxGradient .Color class can still parse and utilize the rich.color.Color's standard colors but in addition to Hex and RGB colors, it can also parse RGB Tuples as well as X11 color names. I've also included the colors that MaxGradient uses to create random gradients from for convenience. The follow are the available named colors as well as there hex and rgb colors:
Color Examples
Created by
Changelog
v0.2.9 | Updated Banner
- Updated MaxGradient Logo and Favicon
- Updated banner to include new logo as http rather than refernceing the svg file locally.
v0.2.8 | Fixed cli.py
- Fixed
cli.pyso that it works with the newgradientmethod - Removed logging
v0.2.7 | Bug Fixes
- Combined multiple CSS stylesheets into one:
next-btn.css->style.cssgradient.css->style.css
- General corrections to every file after correcting for Mypy
v0.2.6 | Type Stubs
- Added type stubs - Mypy should work now
- Simplified
maxgradient.log.pyand fixed line lengths
v0.2.5 | Renamed Files
- Removed erroneous
maxgradient._console.pyfile - Renamed several files:
maxgradient._gc.py->maxgradient._gradient_color.pymaxgradient._hex.py->maxgradient._hex_color.pymaxgradient._rgb.py->maxgradient._rgb_color.pymaxgradient._x11.py->maxgradient._x11_colormaxgradient._rich.py->maxgradient._rich_color.py
v0.2.4 | Converted to linting with ruff
- Rewrote
MaxGradient.console.Consoleto replicaterich.console.Console- added
gradientmethod - added
gradient_rulemethod
- added
- Switched to
rufffor linting - Pruned dependencies
- Updated default_styles.GRADIENT_STYLES
v0.2.3
- Updated docs and added more examples and reference
- Fixed bugs
- Fixed bug where gradient would not print if gradient was the only thing in the console
- Fixed bug where gradient wouldn't print if the style wasn't a
rich.style.Styleobject
v0.2.2
- Added examples to docs and fixed some typos and bugs
- Disabled logging
- Fixed gradient class
- Added gradient rules
v0.1.6
- Added docs
- Changed docs to readthedocs theme.
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 maxgradient-0.2.9.tar.gz.
File metadata
- Download URL: maxgradient-0.2.9.tar.gz
- Upload date:
- Size: 373.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.10.3 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17f3dc5f6ea397fe9604d63b04a08a85fda94425a5b49a34d7aea680e3fec024
|
|
| MD5 |
d2f6de9d3f6f42bbfc585915078b25e8
|
|
| BLAKE2b-256 |
91666021fe89688e8d8c496a04fcaa2113b5a568fe2ae575dd2af5068c2f45da
|
File details
Details for the file maxgradient-0.2.9-py3-none-any.whl.
File metadata
- Download URL: maxgradient-0.2.9-py3-none-any.whl
- Upload date:
- Size: 458.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.10.3 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c46ecacf7988e514437f356606c2ae3b3426e1dd94887eeaea2df34d9f27c8c
|
|
| MD5 |
60c9bcecb6d280c9327f51904fd0f7a9
|
|
| BLAKE2b-256 |
21560917dee15f86bec252605328418a147f238a85221751a78e20027026297e
|