Re: [csswg-drafts] [css-color-5] What are the color functions (or color adjusters)? (#4743)

1. Yes, I just opened [that issue today](#4747) before seeing this issue.

2a. The bikeshed source is
```
The <dfn export>color-functions</dfn> are <rgb()>, <rgba()>,
  <hsl()>, <hsla()>, <hwb()>,
  <lab()>, <lch()>,
  <color()>, and <device-cmyk()>.
This is supposed to auto-link to their definitions, but doesn't.

2b. In Una's proposal, those would correspond to `colorspace`, and `color-function` is undefined, which is why I opened #4747 so they can be correctly defined
```
2c. Bikeshed autolinking currently works well when one spec links to another, but only the latest version of each spec is linked to, by design. Unfortunately that means that color-5 can't link to color-4 which is an issue holding back first publication of color-5 (and several other specifications). @fantasai is working on a patch to bikeshed to allow this.

3. Yes. Also, `adjusters` is a better and less overloaded term than `color-function` which has a definition in CSS Color 4 (and an expanded definition in CSS Color 5, which allows relative color functions).

4a. In @una  proposal the default colorspace is `lch` and so `lightness`, `chroma` and `hue` are available. 

4b. The appropriate ones are available if you switch colorspace (and colors are first converted tothat colorspace before manipulation). So for example if the colorspace is set to `hsl` then the colors all get converted to sRGB and then a `hue` manipulation will work on HSL hue.

4c. If you use an unavailable adjuster then the colorspace should auto-convert to the one that has this adjuster. So using `chroma` would auto-conver to LCH.

4d. Need to define what happens if you use `hue` or `lightness` in, say, `rgb` where there isn't an obvious default to convert to. That might be disambiguated by picking distinct names (at the expense of verbosity) or by saying it always goes to LCH since that is the default anyway.


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

Received on Wednesday, 5 February 2020 23:21:43 UTC