Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify color palette creation #5

Merged
merged 3 commits into from
Sep 2, 2023
Merged

Conversation

tfuxu
Copy link
Owner

@tfuxu tfuxu commented Sep 2, 2023

This PR modifies the parameter create_palette function accepts. From now instead of color.RGBA Golang objects, it accepts lists of RGBA color channel values of hexadecimal color codes (they can be mixed).

NOTE
This is a breaking change.

… values

This change simplifies creation of user defined/dynamic color palettes by using RGBA color channel lists and hexadecimal color codes instead of `color.RGBA` Golang objects.
This is a breaking change, as using `color.RGBA` objects is now disallowed and `RGBA` wrapper function has been removed.

- Create internal `utils/color` module for color code parsing and conversion to `color.RGBA` Golang objects
- Include `utils` modules in packaged wheels
- Create public `exceptions` module for storing and accessing global exception classes used in `dither-go` modules
- From now require an list of RGBA color channel values or hexadecimal color codes in `create_palette` wrapper function
- Remove `RGBA` wrapper function
- Expand docstrings in most functions
This test can be executed by using `pytest`.
@tfuxu tfuxu merged commit b7ab855 into master Sep 2, 2023
11 checks passed
@tfuxu tfuxu deleted the simplify-palette-wrapper branch September 2, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant