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

Wrong alpha and moire with semi-transparent colors #14

Open
LeaVerou opened this issue Sep 1, 2015 · 0 comments
Open

Wrong alpha and moire with semi-transparent colors #14

LeaVerou opened this issue Sep 1, 2015 · 0 comments

Comments

@LeaVerou
Copy link
Owner

LeaVerou commented Sep 1, 2015

image

This is due to the way arcs are painted overlapping, to prevent moire, which results in more opaque semi-transparent colors which also exhibit moire.

This can be solved by painting the gradient without any alpha information, then making another black-white gradient with the alpha information and using it as a mask via canvas compositing modes.

Putting it here in case someone has time to code it, otherwise it’ll probably have to wait :/

joyously added a commit to joyously/conic-gradient that referenced this issue May 21, 2018
Addresses LeaVerou#14 Wrong alpha and moire with semi-transparent colors
Also allows color stops greater than 100%, like CSS gradients do.
joyously added a commit to joyously/conic-gradient that referenced this issue May 21, 2018
* Use the canvas gradient function to compute the correct colors

Addresses LeaVerou#14 Wrong alpha and moire with semi-transparent colors
Also allows color stops greater than 100%, like CSS gradients do.

* Update examples and remove reference to limitation
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

No branches or pull requests

1 participant