Skip to content

[css-color-4] Slightly incorrect sRGB inverse transfer function #9467

Closed
@jessestricker

Description

@jessestricker

The sRGB inverse transfer function, the one from the non-linear to the linear sRGB values, is given in the CSS spec with a comparison that diverges from the sRGB standard.

The CSS spec states:

if (abs < 0.04045) {
  cl = c / 12.92;
}
// ...

But in the DIN EN 61966-2-1:2003-09, which is the German version of the EN 61966-2-1:2000 + A1:2003 (“sRGB standard”),
the comparison is stated using the less-than-or-equal operator, so the sample code should be:

if (abs <= 0.04045) { // note the use of the less-than-or-equal operator
  cl = c / 12.92;
}
// ...

Is this deviation from the sRGB standard intentional? Is it negligible? Or is the German version of the sRGB standard incorrect?

The affected sections are:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions