Skip to content

Commit 2847fa9

Browse files
committed
[css-color-4] more guidance on selecting color space for mixing
1 parent d920f07 commit 2847fa9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

css-color-4/Overview.bs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4395,12 +4395,18 @@ Interpolation</h2>
43954395
<h3 id="interpolation-space">
43964396
Color space for interpolation</h3>
43974397
Different color spaces may be more appropriate for each interpolation use case.
4398-
For example, Lab works well for gradients, and LCH works well for color mixing.
4398+
For example,
4399+
the perceptually uniform Lab works well for avoiding bunching up in gradients,
4400+
and the chroma-preserving LCH works well for avoiding greying out in color mixing,
4401+
while the linear-light XYZ is best for compositing
4402+
and gamma-encoded sRGB, which is neither linear light nor perceptually uniform,
4403+
will give overly dark mixes but is compatible with older Web content.
43994404
The host syntax may define what the default interpolation space should be for each case,
44004405
and optionally provide syntax for authors to override this default.
44014406

44024407
If the host syntax does not define what colorspace interpolation should take place in,
44034408
it defaults to Lab. In that case, user agents may handle interpolation
4409+
<!-- is that realy a MAY ? -->
44044410
between legacy sRGB color formats
44054411
(hex colors, named colors,
44064412
''rgb()'', ''hsl()'' or ''hwb()''

0 commit comments

Comments
 (0)