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

Match color.RGBA() behavior from the standard library #30

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

billy4479
Copy link
Contributor

Fixes #29.

See original issue and commit messages.

The template requires whisker 2.5.1 but in nix we were stuck with 2.3.0
I think this was the intended behavior, we want the colors to be fully
opaque.
Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we need the RGBA8 func, other than that lgtm

@billy4479
Copy link
Contributor Author

No strong feelings about RGBA8, I just put it there to preserve the original behavior, I'm also not 100% on it since the RGB slice is available and contains the same data. If you don't think it is necessary to keep I can remove it no problem.

Thanks for the review :)

@caarlos0
Copy link
Member

yeah I think we can remove it then :)

thanks for the PR, btw ❤️

In the standard library color.RGBA() expects returned values to be in
the interval [0, 0xffff]. With this patch we match the behavior of
image.color.RGBA.RGBA().

Tests were updated accordingly and a test was added to make sure we
match the implementation of the standard library.
@billy4479
Copy link
Contributor Author

Alright, should be good to go :)

@caarlos0 caarlos0 merged commit e292d33 into catppuccin:main Jan 2, 2025
2 checks passed
@caarlos0
Copy link
Member

caarlos0 commented Jan 2, 2025

thank you!

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.

RGBA() does not return the right values
2 participants