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
Editor: Adam Argyle, Google, https://nerdy.dev, w3cid 112669
13
14
Abstract: This module extends CSS Color [[css-color-4]] to add color modification functions.
14
15
Repository: w3c/csswg-drafts
15
16
</pre>
@@ -19,7 +20,7 @@ Introduction {#intro}
19
20
20
21
<em>This section is not normative.</em>
21
22
22
-
Web developers and design systems developers
23
+
Web developers, design tools and design systems developers
23
24
often use functions to design components.
24
25
With the increasing usage of design systems that support multiple platforms,
25
26
and increased capability of Dark Mode in UI,
@@ -29,14 +30,25 @@ Introduction {#intro}
29
30
Currently Sass, calc() on HSL values, or PostCSS is used to do this.
30
31
Preprocessors are unable to work on dynamically adjusted colors,
31
32
and all current solutions are restricted to the sRGB gamut
32
-
and to the perceptual limitations of HSL.
33
+
and to the perceptual limitations of HSL
34
+
(colors are bunched up in the color wheel,
35
+
and two colors with visually different lightness,
36
+
like yellow and blue,
37
+
can have the same HSL lightness).
33
38
34
39
This module adds three functions:
35
40
''color-mix'',
36
-
''color-contrast''
37
-
and a way to modify existing colors.
41
+
''color-contrast'' and
42
+
''color-adjust''.
38
43
39
-
Issue(3187): there are two proposals for color modification.
44
+
The perceptually uniform ``lch()`` colorspace
45
+
is used for mixing by default,
46
+
as this has no gamut restrictions
47
+
and colors are evenly distributed.
48
+
However, other colorspaces can be specified,
49
+
including ``hsl()`` or ``srgb`` if desired.
50
+
51
+
Issue(3187): there are two proposals for color modification (<a href="https://github.com/w3c/csswg-drafts/issues/3187#issuecomment-499126198">proposal 1</a>, <a href="https://gist.github.com/una/edcfa0d3600e0b89b2ebf266bf549721">proposal 2</a>).
40
52
The CSS WG expects that the best aspects of each
41
53
will be chosen to produce a single eventual solution.
42
54
@@ -60,9 +72,9 @@ Mixing colors: the ''color-mix'' function {#colormix}
60
72
61
73
<div class="example">
62
74
This example produces the mixture of red and yellow,
63
-
in ''lch'' colorspace (the default),
75
+
in ''lch()'' colorspace (the default),
64
76
with the lightness being 30% of the lightness of red
0 commit comments