- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Tue, 22 Aug 2023 17:01:47 +0000
- To: public-css-archive@w3.org
@facelessuser wrote: > The only thing that could change this is if CSS requires an OkLCh (or any cylindrical space) hue to become missing during interpolation even if an explicit hue is defined and chroma is zero. I don't recall exactly what CSS specifies here, It does require it. The spec [says](https://drafts.csswg.org/css-color-4/#interpolation-missing): > If a color with a carried forward [missing component](https://drafts.csswg.org/css-color-4/#missing-color-component) is interpolated with another color which is not missing that component, the missing component is treated as having the other color’s component value. > Therefore, the carrying-forward step must be performed before any [powerless component](https://drafts.csswg.org/css-color-4/#powerless-color-component) handling. and [also says, for Oklch](https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch): > If the chroma of an Oklch color is 0% or 0, the hue component is [powerless](https://drafts.csswg.org/css-color-4/#powerless-color-component). and, [for CIE LCH](https://drafts.csswg.org/css-color-4/#specifying-lab-lch): > If the chroma of an LCH color is 0%, the hue component is [powerless](https://drafts.csswg.org/css-color-4/#powerless-color-component). and [says, for HSL](https://drafts.csswg.org/css-color-4/#the-hsl-notation): > If the saturation of an HSL color is 0%, then the hue component is [powerless](https://drafts.csswg.org/css-color-4/#powerless-color-component). HWB is polar but doesn't have a Chroma or Saturation analog so the HWB doesn't have powerless hues. Which is odd, but I don't see an obvious way around that. It also [says, regarding hues](https://drafts.csswg.org/css-color-4/#hue-syntax) (my emphasis): > [<hue>](https://drafts.csswg.org/css-color-4/#typedef-hue) components are the most common components to become [powerless](https://drafts.csswg.org/css-color-4/#powerless-color-component); **any achromatic color will have a powerless hue component.** Lastly, and allowing some implementation-defined wiggle room it [says](https://drafts.csswg.org/css-color-4/#powerless): > User agents may treat a component as [powerless](https://drafts.csswg.org/css-color-4/#powerless-color-component) if the color is "sufficiently close" to the precise conditions specified. For example, a gray color converted into [lch()](https://drafts.csswg.org/css-color-4/#funcdef-lch) may, due to numerical errors, have an extremely small chroma rather than precisely 0%; this can, at the user agent’s discretion, still treat the hue component as powerless. It is intentionally unspecified exactly what "sufficiently close" means for this purpose. -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8609#issuecomment-1688590333 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 22 August 2023 17:01:49 UTC