Skip to content

[css-color] [filter-effects] Should no-op filters produce different output from no filter? #7100

@smfr

Description

@smfr

The filter property states that "Functions must operate in the sRGB color space". This implies that all the input colors to filters, like display-p3 colors and images with P3 color profiles get flattened to sRGB before filter processing.

This has the unfortunate side effect that the results of filter: none and filter: saturate(1) are different when the filtered content contains P3 colors, and that authors can't apply nice filter effects to P3 images while retaining out-of-sRGB colors.

Chrome appears to not follow this spec text precisely, and seems (on macOS at least) to apply filters in some extended sRGB colorspace (tested on iMac Pro with DisplayP3 display).

Testcase: https://codepen.io/smfr/pen/PoOVmPX

cc @svgeesus

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions