Skip to content

anyrender_skia: convert DynamicColor to sRGB before creating SkColor4f#48

Open
jrmoulton wants to merge 1 commit intoDioxusLabs:mainfrom
jrmoulton:push-nmxvxpvsooqu
Open

anyrender_skia: convert DynamicColor to sRGB before creating SkColor4f#48
jrmoulton wants to merge 1 commit intoDioxusLabs:mainfrom
jrmoulton:push-nmxvxpvsooqu

Conversation

@jrmoulton
Copy link
Contributor

color4f_from_dynamic_color was treating DynamicColor.components as if they were already RGBA channel values. That is only correct for RGB-family color spaces. For colors tagged as HSL, HWB, Lab, Oklab, and similar spaces, those components represent color-space-specific coordinates, not red/green/blue.

color4f_from_dynamic_color was treating DynamicColor.components as if they
were already RGBA channel values. That is only correct for RGB-family color
spaces. For colors tagged as HSL, HWB, Lab, Oklab, and similar spaces, those
components represent color-space-specific coordinates, not red/green/blue.

Convert DynamicColor through to_alpha_color::<Srgb>() before constructing
SkColor4f so Skia receives actual RGBA values. This fixes gradients and other
paint paths that use non-RGB dynamic colors.
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

Successfully merging this pull request may close these issues.

1 participant