mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb/CSS: Add fixme for sRGB color interpolation
Corresponds to a0a9886063
This commit is contained in:
parent
046d1169de
commit
1435480d76
Notes:
github-actions[bot]
2025-06-17 11:40:11 +00:00
Author: https://github.com/AtkinsSJ
Commit: 1435480d76
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5113
1 changed files with 4 additions and 0 deletions
|
@ -599,6 +599,10 @@ Color interpolate_color(Color from, Color to, float delta)
|
|||
{
|
||||
// https://drafts.csswg.org/css-color/#interpolation-space
|
||||
// If the host syntax does not define what color space interpolation should take place in, it defaults to Oklab.
|
||||
// However, user agents must handle interpolation between legacy sRGB color formats (hex colors, named colors,
|
||||
// rgb(), hsl() or hwb() and the equivalent alpha-including forms) in gamma-encoded sRGB space. This provides
|
||||
// Web compatibility; legacy sRGB content interpolates in the sRGB space by default.
|
||||
// FIXME: Use srgb by default for these, once we can distinguish what form a color was specified in.
|
||||
auto from_oklab = from.to_oklab();
|
||||
auto to_oklab = to.to_oklab();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue