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

Adjust alpha value #39

Open
i-am-the-slime opened this issue Mar 28, 2021 · 3 comments
Open

Adjust alpha value #39

i-am-the-slime opened this issue Mar 28, 2021 · 3 comments

Comments

@i-am-the-slime
Copy link
Contributor

Is there a combinator or another way to adjust the alpha value of a given (HSLA) colour?

@sharkdp
Copy link
Collaborator

sharkdp commented Apr 3, 2021

I don't think there is (haven't worked on this project for a while). But Color is just

data Color = HSLA Hue Number Number Number

with the last Number being the alpha value. So you should be able to modify it "by hand".

@paulyoung
Copy link

paulyoung commented Apr 29, 2022

It seems that the constructor isn't exported so we can't pattern match on it.

@JordanMartinez
Copy link
Member

I'm not sure the constructor should be exported. Plus, that would be a breaking change and I'd rather not have to fix that, too.

So, perhaps a function like Either's either that exposes the values wrapped by Color could be added in a PR as a non-breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants