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

[COLRv2] Smoother gradients #373

Open
underware opened this issue Aug 17, 2023 · 4 comments
Open

[COLRv2] Smoother gradients #373

underware opened this issue Aug 17, 2023 · 4 comments

Comments

@underware
Copy link

In COLRv1, linear, radial, and sweep gradients are interpolated linearly. This can produce sharp 'bands' (see top row). How could this challenge be solved the most easily in COLRv2? In the bottom row, for example, you can see an ‘HOI’ style solution using two layers blended with PaintComposite. But obviously, that's not always practical. It would be much better if there were an additional PaintLinearGradient, with the option to choose between different interpolations (linear, spline interpolation...).

Screenshot 2023-08-17 at 11 58 12

In addition, I am wondering if it would make sense to add color-interpolation-methods to COLRv2.
https://developer.mozilla.org/en-US/docs/Web/CSS/color-interpolation-method

@rsheeter
Copy link
Contributor

Vigorously agree we need better interpolation options. Do you think it would be fair to call this a duplicate of #356?

@underware
Copy link
Author

I'm not sure. I think there are two challenges: color spaces and the interpolation algorithms. With the options provided by the CSS color-interpolation-method (offering access to different color spaces), it is still challenging to achieve a smooth gradient (see examples below). Ideally, you would have better control of the interpolation.
See also here: http://tavmjong.free.fr/SVG/MESH/Mesh_Boundaries.html

Screenshot 2023-08-18 at 10 25 03

@behdad
Copy link
Collaborator

behdad commented Aug 18, 2023

Vigorously agree we need better interpolation options. Do you think it would be fair to call this a duplicate of #356?

I'm not sure it is either.

@behdad
Copy link
Collaborator

behdad commented Aug 18, 2023

This seems more like https://developer.mozilla.org/en-US/docs/Web/CSS/transition-timing-function but for the color-line.

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

3 participants