Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]¶
v0.3.6 - 2025-09-10 | Consolidated Gradient, RNG fix, gamma-correct Text, docs/tests¶
Added / Changed¶
- Gradient
- Consolidated to a single public factory (
rich_gradient.gradient.Gradient) that returnsBaseGradientorAnimatedGradientinternally. - Kept test helper methods by adding equivalents to
BaseGradient(_color_at,_styled,_interpolated_color) and_active_stopsinitialization. - Added
background=support toBaseGradient/AnimatedGradientfor parity with previous API.
- Consolidated to a single public factory (
- Text
- Interpolates colors with gamma-correct blending for visual consistency with
Gradient.
- Interpolates colors with gamma-correct blending for visual consistency with
- Spectrum
- Uses a dedicated
random.Random(seed)instance to avoid mutating global RNG state; behavior is deterministic per seed without side effects.
- Uses a dedicated
- Rule
- Normalized invalid color errors to
ValueErrorfor consistency.
- Normalized invalid color errors to
- Package Init
- Centralized
rich-color-extinstall to package init; removed duplicate installs from other modules.
- Centralized
- Repo Hygiene
- Removed committed build artifacts (
dist/) and static site (site/) from source; they remain in.gitignore.
- Removed committed build artifacts (
- Docs / Examples / Tests
- README basic example fixed (missing parenthesis).
- Benchmark test now measures actual console printing safely.
- CLI
- Relaxed
--justifyand--overflowoption annotations fromLiteral[...]tostrwith explicit validation for broader Typer/Click compatibility. - Pinned dependencies to stabilize CLI behavior:
typer>=0.12.5,<0.13andclick>=8.1.7,<9.0.0.
- Relaxed
- Tests
- Made CLI tests portable across Click/Typer versions by removing
mix_stderrusage and accepting warnings from stdout or stderr.
- Made CLI tests portable across Click/Typer versions by removing
- Cleanup
- Removed duplicate internal
Gradientfactory leftover in_animated_gradient.py; the public factory now lives inrich_gradient/gradient.py.
- Removed duplicate internal
- Docs
- Added _base_gradient_ref.md for referencing BaseGradient
- Added _animated_gradient_ref.md for referencing AnimatedGradient
Fixed¶
- Eliminated duplicate Gradient implementations that could drift out of sync.
- Avoided global RNG seeding in
Spectrumthat could affect host applications.
v0.3.4 - 2025-09-03 | Text.as_rich(), background gradients, spectrum + docs¶
v0.3.4 Added¶
- Text
.as_rich()method to return a plainrich.text.Textwith all spans/styles preserved..richconvenience property wrappingas_rich().- Background gradients via
bgcolors=; multiple bg stops interpolate alongside foreground. - Robust color normalization supporting
Color,ColorTriplet,(r,g,b)tuples, CSS names, 3/6‑digit hex, andrgb()strings. - Spectrum
- Deterministic
seed, color names, styles, hex accessors, and a rich preview table renderable. - Docs/Examples
- New SVG/PNG assets for gradient text examples under
docs/img/v0.3.4/and updated spectrum preview.
v0.3.4 Updated¶
- Text
- Improved error types/messages and comprehensive module documentation.
- Single‑color fast‑path applies one composed
Styleacross content for performance. - Empty text rendering no longer emits a trailing newline/segment; nested renderables filtered accordingly.
- Gradient and BaseGradient
- Gamma‑corrected color interpolation, smoother stop wrapping, explicit alignment validation, and safer measurement when no renderables.
- Support for
repeat_scale/phaseused by animated variants. - Rule
- Accepts colors as strings,
Color,ColorTriplet, or RGB tuples with clearer validation and messages. - Title style applied after gradient generation for accurate highlighting.
- Package Init / Theme
- Install
rich-color-exton import and monkey‑patchConsole._collect_renderablesto suppress emptyTexttrailing newline. - Theme helpers for consistent docs SVG generation (
GRADIENT_TERMINAL_THEME). - README/Docs
- Expanded examples and color‑format visuals; refreshed links and images.
v0.3.4 Fixed¶
- Suppressed stray newline output when rendering empty gradient
Text(affects console capture/recorded SVGs).
v0.3.3 - 2025-08-27 | Added tests and Fixed Bugs¶
v0.3.3 Updated¶
- Enhanced rendering and color handling in gradient components
- Refactored rich-gradient for improved structure and functionality
- Reorganized imports in
__init__.pyfor clarity. - Updated AnimatedGradient to ensure color extension is installed at package import time.
- Enhanced BaseGradient to improve gradient wrapping logic and error handling.
- Improved logger utility with better error handling and configuration options.
- Adjusted Gradient class to ensure quit panel behavior is consistent and intuitive.
- Added comprehensive tests for edge cases in Gradient and Text classes, including long text, unicode handling, and color validation.
- Enhanced Spectrum class to support color generation with optional seed for reproducibility.
- Improved Text class to ensure proper initialization and color parsing.
- Updated test suites for Gradient and Spectrum to cover additional scenarios and edge cases.
v0.3.2 Added tests and Fixed Bugs¶
v0.3.2 Removed¶
- Dev Dependencies
snoopcheap-repr
v0.3.2 Updated¶
- Removed instances that were imported from:
snoop@snoop()
cheap-reprregister_repr(f"{class})(normal_repr)
- Renamed GradientRule -> Rule
- to match the naming of the other modules in
rich-gradient
v0.3.2 Added¶
- Tests
tests/benchmark_perf.py: To benchmark the performance of generating gradients that span large amounts of characters.tests/test_edge_cases.py: To cover edge cases that may otherwise breakrich-gradient.
v0.3.0 - 2025-06-20 | Working Rewrite¶
v0.3.0 Added¶
- Validated working and added tests for:
rich_gradient.text.Textrich_gradient.gradient.Gradientrich_gradient.rule.GradientRulerich_gradient.spectrum.Spectrumrich-color-extacting as adequate replacement for previous color logic- Added examples directory containing:
animated_gradient_example.pygradient_example.pyhello_world.pyrainbow_gradient.pyspecific_color_gradient.pytext_markup.pytwo_color_gradients.py- Generated updated exports for examples for documentation (still in the works)
v0.3.0 Updated¶
docs/index.md
v0.3.0 TODO¶
- Update Documentation
- Expand Tests
- Work on Gradient Panel and Table Renderables
v0.3.0 Removed¶
Removed all of the the archived modules from rich_gradient/archive/*
v0.2.1 Rewrite¶
There was a lot of overhead in rich-gradient so I rewrote it from the ground up with an actual goal. I created rich-color-ext to wrap around rich's color parsing removing the need for the_rgb.py, color.py, color_data.py, _colors.py, and all of their tests.
v0.2.0 - 2025-3-13 | uv, pure python, and 3.13.2¶
There are a number of significant changes in v0.2.0:
rye → uv¶
Astral has done a hell of a job making python dev tools. ruff blew the existing python linters out of the water and uv pretty much did the same thing to package managers. Rich-gradient was started on rye but as Astral has since depreciated it, it's moved to their current rust powered python package manager, uv.
Pure Python¶
Rich-gradient is now a pure-python package. This allows it to be more easily used regardless of platform. As rich-gradient previously had pydantic as a dependency, it now just borrows the logic from pydantic-extra-types.color.
3.13.2¶
After switching to uv, the package has been updated to python 3.13.2.
v0.2.0 Updated¶
- Switched rich-gradient package manager from astral/rye to astral/uv
- Updated python to
3.13.2
v0.2.0 Changed¶
- Removed
pydanticandpydantic-extra-typesdependencies. - Updated the names of some of the colors. For example greenyellow became lawngreen.
- Updated
README.md,CHANGELOG, and documentation.
v0.2.0 Added¶
src/rich_gradient/_base_color.py: stores the color logic from pydantic-extra-types.color modules stripped of the pydantic framwork.
v0.1.7 - 2024-7-16 | Added support for Two-Color Gradients¶
v0.1.7 Updated¶
- Updated Gradient.generate_subgradients() to default to returning a list containing a single simple gradient to allow Gradients to work when only supplied with two colors.
v0.1.7 Added¶
- Added len, int, str, and repr dunder methods to
rich-gradient.gradient.Gradient(will simply refer to asGradientfrom here on out). - Added a tests/test_gradient.py for Gradient to test two color gradiets
v0.1.6 - 2024-6-28 | Updated Rev¶
- Updated rev to 0.1.6.
v0.1.5 - 2024-6-28 | Added Tests¶
v0.1.5 Updated¶
- Updated requirements for minimum versions of python from 3.8 -> 3.10.
- Added
pytestto dev-dependancies.
v0.1.5 Added¶
- Tests for:
- Color
- Specturm
- SimpleGradient
v0.1.4 | 2024-6-28 | Resolved Dependancies¶
v0.1.4 Updated¶
- This release is primarily to prune unnecessary dependancies.
- Removed
numpyto avoid issues ofnumpyversion 2.0.0 conflicting withtorch.
v0.1.3 - 2021-10-10¶
v0.1.3 Fixed¶
- Updated README to use GitHub pages for example gradient image.
v0.1.2 - 2021-10-10¶
v0.1.2 Updated¶
- Updated PyProject.toml description.
- Moved MKDocs and related dependancies to dev-dependancies.
v0.1.2 Fixed¶
- Updated README to use GitHub pages for banner image.
- Updated README to use GitHub pages for docs url.
v0.1.1 - 2021-10-10¶
v0.1.1 Fixed¶
- Updated README to use GitHub pages for images.
v0.1.0 - 2021-10-10¶
Initial release. Based off of MaxGradient with a simplified color model based on pydantic-extra-types.color.Color. Re-released as rich-gradient to avoid confusion with MaxGradient.