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.
- Overhauled the CLI to use the
typer
library for a more user-friendly experience. Note this is a breaking change for CLI users. Runpylette --help
for more information.
- Fixed a bug where the CLI did not respect the
--colorspace
argument when extracting colors.
- Fixed a bug where the color frequencies of colors in a palette were not summing to one when using the Median Cut algorithm.
- Changed the
image
argument to theextract_color
function to accept:- A path to an image file, as a string or a pathlike.
- An URL to an image file, as a string.
- A byte stream of an image file, as a bytes object.
- A numpy array of an image file, as a numpy array.
- Added
image_array
to theextract_color
function, allowing the user to specify an image as a numpy array.
- Added
image_bytes
to theextract_color
function, allowing the user to specify an image as a byte stream to extract colors from.
- Added
random_state
to theKMeans
algorithm to ensure reproducibility. Two separate KMeans extractions now yield the same palettes. Thanks to @opeyemibami for fixing.
- Added type hints for the methods in the
Pylette
package. - Added integration tests for color extraction. Make sure certain invariants hold for the extracted colors.
- Fixed the color conversion from RGB to HLS, and RGB to HSV, which was incorrect.
- Regression where
requests
were missing as a dependency.
- Added an
image_url
argument to theextract_color
function, allowing the user to specify an image URL to extract colors from. - Added the
--image-url
argument to the CLI, allowing the user to specify an image URL to extract colors from.
- Changed the positional argument
filename
to an optional argument in the CLI.
- Changed
aux.py
toutils.py
, fixing a platform specific issue on Windows.
- The Pylette GUI has been removed, due to problems keeping the PyQT-library