You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I changed to use P3 wide colors in our app, I noticed that the gradients didn't use that color space.
I looked through the code and saw that MKGradientGenerator uses CGColorSpaceCreateDeviceRGB. I changed that to CGColorSpace(name: CGColorSpace.displayP3) and the gradient was displaying in P3.
Maybe you can add a parameter (with default value) or get the color space from the start/end color?
Thanks!
The text was updated successfully, but these errors were encountered:
@Thomasch wide colors are not really supported by the lib at the moment and all color components are clipped to [0.0, 1.0] range. So I think it makes no sense to add P3 color space support just yet.
When I changed to use P3 wide colors in our app, I noticed that the gradients didn't use that color space.
I looked through the code and saw that MKGradientGenerator uses CGColorSpaceCreateDeviceRGB. I changed that to CGColorSpace(name: CGColorSpace.displayP3) and the gradient was displaying in P3.
Maybe you can add a parameter (with default value) or get the color space from the start/end color?
Thanks!
The text was updated successfully, but these errors were encountered: