Re: [csswg-drafts] [css-color-5] Clarification on how `channel keywords` with multiple specified types work (#7876)

Another question about this: WPT has this test: https://github.com/web-platform-tests/wpt/blob/7c0ad5dcce2aa7a073b6f09b99213325b0c4574a/css/css-color/parsing/color-computed-relative-color.html#L90

```js
test_computed_value(`color`, `rgb(from rebeccapurple b alpha r / g)`, `rgba(153, 255, 102, 0.2)`);
```

This implies either that `alpha` values are stored in 0-255 range rather than 0-1 as specified by [`<alpha-value>`](https://w3c.github.io/csswg-drafts/css-color-4/#typedef-alpha-value), or that they are somehow converted. Here the alpha becomes the green channel (1 becomes 255), and the green channel becomes the alpha channel (51 becomes 0.2).

Is this the intentional behavior or should the output actually be `rgba(153, 1, 102, 1)`?

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


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

Received on Thursday, 13 April 2023 15:36:31 UTC