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

icon-color inconsistency between canvas and WebGL #15290

Open
mike-000 opened this issue Nov 1, 2023 · 1 comment · May be fixed by #15295
Open

icon-color inconsistency between canvas and WebGL #15290

mike-000 opened this issue Nov 1, 2023 · 1 comment · May be fixed by #15295
Labels

Comments

@mike-000
Copy link
Contributor

mike-000 commented Nov 1, 2023

Describe the bug
Alpha in icon-color has a different effect in canvas and WebGL.

To Reproduce
Compare applying an icon-color of #ff000040 in WebGL (left) and canvas (right)

image
In WebGL the alpha affects the icon opacity, in canvas it does not and merely tints the icon with a semi-opaque color.

Expected behavior
Same behavior in canvas and WebGL Should a transparent "tint" make an icon transparent or have no effect?

@mike-000
Copy link
Contributor Author

mike-000 commented Nov 3, 2023

The inconsistency above can been fixed in canvas for icons which are have no semi-transparency by separately applying the full color, followed by the alpha as global alpha. There is however an additional inconsistency with semi-transparent icons, even when tinted with fully opaque colors. For example an icon with alpha increasing from top to bottom and grayscale color increasing from left to right, tinted red, canvas above, WebGL below:

image

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