Skip to content

Commit 42dbfa5

Browse files
committed
[css-color-4] export polar and rectangular terms
1 parent 680a62f commit 42dbfa5

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

css-color-4/Overview.bs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,17 @@ Representing Colors: the <<color>> type</h2>
293293
<<color()>>.
294294

295295
Of those, <<hsl()>>, <<hsla()>>, <<hwb()>> and <<lch()>>
296-
are cylindrical polar representations,
296+
are <dfn export>cylindrical polar color</dfn> representations,
297297
which specify color using a <<hue>> angle,
298298
a central axis representing lightness
299299
(black-to-white),
300300
and a radius representing saturation or chroma
301-
(how far the color is from a neutral grey)
301+
(how far the color is from a neutral grey).
302+
The other colorspaces are
303+
<dfn export>rectangular orthogonal color</dfn> representations,
304+
which specify color using three
305+
(or more, in the case of CMYK or CMYKOGV)
306+
orthogonal component axes.
302307

303308
<!-- <<device-cmyk()>> does not actually specify a color; it can't be converted to Lab -->
304309

css-color-5/Overview.bs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,25 +760,37 @@ occurs by linearly interpolating each component of the computed value of the col
760760
separately, in that colorspace.
761761
This provides Web compatibility; legacy sRGB content interpolates in the sRGB space by default.
762762

763-
Issue: Should gamut mapping occur before or after interpolation?
764-
765-
Issue(4928): How to handle achromatic interpolation?
766763

767764
Interpolating to or from ''<color>/currentcolor'' is possible.
768765
The numerical value used for this purpose is the used value.
769766

770767
Color space for interpolation {#interpolation-space}
771768
------------------------------
772769

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.
774775
Host syntax can override the interpolation color space and specify which color space is used for interpolation.
775776
For example, 'color-mix' and 'color-adjust' override the default to LCH.
776777

777778
Issue: Should the colors at 0% and 100% be serialized with their original color spaces or converted to the interpolation space?
778779

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+
779789
Hue interpolation {#hue-interpolation}
780790
-------------------
781791

792+
Issue(4928): How to handle achromatic interpolation?
793+
782794
For color functions with a hue angle (LCH, HSL, HWB etc), there are multiple ways to interpolate.
783795
We typically want to avoid arcs over 360 for the difference between the angles, as they are rarely desirable,
784796
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

Comments
 (0)