Re: [csswg-drafts] [css-color-5] Should intermediate out of range values be preserved in color-mix? (#10414)

The resolved value is `color(srgb 1.2 0 0)`.

So for the example given in the op, clamping happens on 1, which is probably the consequence of [this change](https://github.com/w3c/csswg-drafts/commit/52c454f05c8061923bd5bdb6bf5814a16ad7a0ed#diff-e1ef1cfacc6b46c293a73dc844f094d931e45a06d078ca40ff09b61570bc16c2L1170):

```diff
  Values outside these ranges are not invalid,
- but are clamped to the ranges defined here at computed-value time.
+ but are clamped to the ranges defined here at parsed-value time.
```

Similarly, the resolved value of `color(from rgb(270 0 0) r 0 0))` is `color(srgb 1 0 0)`, whereas serializing a relative/origin color as a component of a declared value requires preserving the specified channel values.

I [warned](https://github.com/w3c/csswg-drafts/issues/7677#issuecomment-2122515559) about this is in the issue related to the aforementioned change.

I think clamping should be specified to happen at serialization time for sRGB color functions, when appropriate, not at parse time or computed value time.

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10414#issuecomment-4167980100 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 1 April 2026 07:01:50 UTC