MaxGradient automates the printing gradient colored text to the console.
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
Changelog
v3.2.10 | November 25, 2023 | Added Dates
- Updated changlog to have dates
v0.2.9 | November 25, 2023 |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 | November 25, 2023 | Fixed cli.py
- Fixed
cli.py
so that it works with the newgradient
method - Removed logging
v0.2.7 | November 25, 2023 | Bug Fixes
- Combined multiple CSS stylesheets into one:
next-btn.css
->style.css
gradient.css
->style.css
- General corrections to every file after correcting for Mypy
v0.2.6 | November 18, 2023 | Type Stubs
- Added type stubs - Mypy should work now
- Simplified
maxgradient.log.py
and fixed line lengths
v0.2.4
- Rewrote
MaxGradient.console.Console
to replicaterich.console.Console
- added
gradient
method - added
gradient_rule
method
- added
- Switched to
ruff
for 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.Style
object
v0.2.2
- Added examples to docs and fixed some typos and bugs
- Disabled logging
- Fixed gradient class
- Added gradient rules
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
Hashes for maxgradient-0.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e738b02ff5111941effbd388933ffd7e7cc824932552bfa366589b5f3d2fb6fe |
|
MD5 | e40262979d98a296b6a8bb56d49f4f6b |
|
BLAKE2b-256 | 59a202a8a05594125948877a2edb1e1d61b2370bd72d49d7437747dcdb5e4a6b |