You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-color-5/Overview.bs
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -760,25 +760,37 @@ occurs by linearly interpolating each component of the computed value of the col
760
760
separately, in that colorspace.
761
761
This provides Web compatibility; legacy sRGB content interpolates in the sRGB space by default.
762
762
763
-
Issue: Should gamut mapping occur before or after interpolation?
764
-
765
-
Issue(4928): How to handle achromatic interpolation?
766
763
767
764
Interpolating to or from ''<color>/currentcolor'' is possible.
768
765
The numerical value used for this purpose is the used value.
769
766
770
767
Color space for interpolation {#interpolation-space}
771
768
------------------------------
772
769
773
-
If colors are not in the same color space, they are first converted to Lab and and interpolated as Lab colors.
770
+
Issue: Should gamut mapping occur before or after interpolation?
771
+
772
+
If colors are not in the same color space,
773
+
they are first converted to Lab
774
+
and then interpolated as Lab colors.
774
775
Host syntax can override the interpolation color space and specify which color space is used for interpolation.
775
776
For example, 'color-mix' and 'color-adjust' override the default to LCH.
776
777
777
778
Issue: Should the colors at 0% and 100% be serialized with their original color spaces or converted to the interpolation space?
778
779
780
+
Interpolating with alpha {#interpolation-alpha}
781
+
------------------------
782
+
783
+
When the colors to be interpolated are not fully opaque,
784
+
they are transformed into <dfn export>premultiplied color values</dfn>
785
+
as follows:
786
+
787
+
* For rectangular coordinate systems
788
+
779
789
Hue interpolation {#hue-interpolation}
780
790
-------------------
781
791
792
+
Issue(4928): How to handle achromatic interpolation?
793
+
782
794
For color functions with a hue angle (LCH, HSL, HWB etc), there are multiple ways to interpolate.
783
795
We typically want to avoid arcs over 360 for the difference between the angles, as they are rarely desirable,
784
796
so in most cases angles are fixed up prior to interpolation so that per-component interpolation is done over less than 360 degrees, often less than 180.
0 commit comments