Open Bug 2084121 Opened 26 days ago Updated 6 days ago

Gradient end colours outside sRGB are clipped before interpolating (in srgb)

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 159
defect

Tracking

()

UNCONFIRMED

People

(Reporter: timo.mikkolainen, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:159.0) Gecko/20100101 Firefox/159.0

Steps to reproduce

Created an in srgb gradient between two colours outside sRGB, which should have an in-sRGB middle:

<div style="width:512px;height:48px;background:linear-gradient(to right in srgb, color(display-p3 0 1 0), color(display-p3 1 0 1))"></div>

Actual results

The gradient middle ends up grey-ish, just like if I would've used color(srgb 0 1 0) and color(srgb 1 0 1) for the endpoints. It works correctly if I set gfx.color_management.mode = 1.

Expected results

The gradient middle is dark-greenish, as in Chromium. The attachment compares it to the same gradient done with color-mix() stops.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General
Component: General → CSS Parsing and Computation
Product: Firefox → Core

The severity field is not set for this bug.
:tlouw, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(tlouw)

Presumably bug 455077 would address this, based on the note in comment 0. Not sure if there's anything we should do aside from that?

Severity: -- → S3
Depends on: mode-one
Flags: needinfo?(tlouw)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: