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

Alpha blending in Color.Darken and Color.Lighten #305

Closed
Zelyutin opened this issue Jan 23, 2019 · 0 comments
Closed

Alpha blending in Color.Darken and Color.Lighten #305

Zelyutin opened this issue Jan 23, 2019 · 0 comments

Comments

@Zelyutin
Copy link
Contributor

Zelyutin commented Jan 23, 2019

Hi!

I've found interesting thing about Color.Darken() and .Lighten()
If i use the color like this: new Color(153, 173, 136, 60), that has alpha 60, and will use, for example, .Darken(), it will be less transparent because .Darken mixes the color with Black that has 255 alpha.

Does it really should work this way?
In my opinion, dimming and lightening shouldn't affect alpha channel

Maybe, there should be a parameter, at least, like [bool blendAlpha = false] that will allow to define whether we want to blend it or not
It's false by default because, as I think, most of cases will be without blending 🙂
Or maybe, it will be better to create separate function for alpha changing/blending.

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

No branches or pull requests

2 participants