linear-gradient() 使用哪种颜色 space?

Which color space does linear-gradient() uses?

CSS 的 linear-gradient() 函数使用哪种颜色 space,RGB、HSL 或 HSV,为什么?

我可以更改自己选择的颜色 space 吗?

我不知道 HSL 或 HSV,但是当我尝试使用 liner-gradient() 函数时,我会选择 是的,您可以更改 own

的颜色 space

In the future可以指定颜色space

Compared to [css3-images], this level adds a token to customize color interpolation in gradients as described in CSS Color 4 § 12 Interpolation.

linear-gradient() = linear-gradient(
  [ <angle> | to <side-or-corner> ]? || <color-interpolation-method>,
  <color-stop-list>
)
<side-or-corner> = [left | right] || [top | bottom]

您可以继续阅读以了解更多详情


如果您想测试,Safari 对此有一些支持:https://twitter.com/argyleink/status/1490376117064065025