Skip to content

Commit 911b685

Browse files
committedMar 16, 2025·
[css-color-5][editorial] move color-mix intro to start of color-mix() section, fix #10925
1 parent c0cf9f5 commit 911b685

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed
 

‎css-color-5/Overview.bs

+30-30
Original file line numberDiff line numberDiff line change
@@ -101,35 +101,6 @@ Introduction {#intro}
101101

102102
<em>This section is not normative.</em>
103103

104-
Web developers, design tools and design system developers
105-
often use color functions to assist in scaling the design
106-
of their component color relations.
107-
With the increasing usage of design systems that support multiple platforms
108-
and multiple user preferences, like the increased capability of Dark Mode in UI,
109-
this becomes even more useful to not need to manually set color,
110-
and to instead have a single source from which schemes are calculated.
111-
112-
<figure id="fig-chloropleth">
113-
<p><img src="images/LC-picker-scale.png" alt="LC color picker" width=1168 height=1045 style="width: 40vmin"><br/>
114-
<img src="images/LC-picker-map2.png" alt="chloropleth map of the US" width=1396 height=1014 style="width: 48vmin"></p>
115-
<figcaption>Above, a color picker operating in CIE LCH space.
116-
Here, a pair of colors are being used
117-
to define a color scale
118-
on the Chroma-Lightness plane (constant Hue).
119-
Below, the color scale in use on a choropleth map.
120-
</figcaption>
121-
</figure>
122-
123-
<!-- from http://tristen.ca/hcl-picker/#/clh/8/267/0023A5/F8E0D6 -->
124-
125-
Currently Sass, calc() on HSL values, or PostCSS is used to do this.
126-
However, preprocessors are unable to work on dynamically adjusted colors;
127-
all current solutions are restricted to the sRGB gamut
128-
and to the perceptual limitations of HSL
129-
(colors are bunched up in the color wheel,
130-
and two colors with visually different lightness,
131-
like yellow and blue, can have the same HSL lightness).
132-
133104
This module adds the new functions
134105
''contrast-color()'',
135106
''color-mix()'' and ''light-dark()'',
@@ -192,7 +163,36 @@ Introduction {#intro}
192163
Mixing Colors: the ''color-mix()'' Function {#color-mix}
193164
=====================================================
194165

195-
This function takes two <<color>> specifications
166+
Web developers, design tools and design system developers
167+
often use color functions to assist in scaling the design
168+
of their component color relations.
169+
With the increasing usage of design systems that support multiple platforms
170+
and multiple user preferences, like the increased capability of Dark Mode in UI,
171+
this becomes even more useful to not need to manually set color,
172+
and to instead have a single source from which schemes are calculated.
173+
174+
<figure id="fig-chloropleth">
175+
<p><img src="images/LC-picker-scale.png" alt="LC color picker" width=1168 height=1045 style="width: 40vmin"><br/>
176+
<img src="images/LC-picker-map2.png" alt="chloropleth map of the US" width=1396 height=1014 style="width: 48vmin"></p>
177+
<figcaption>Above, a color picker operating in CIE LCH space.
178+
Here, a pair of colors are being used
179+
to define a color scale
180+
on the Chroma-Lightness plane (constant Hue).
181+
Below, the color scale in use on a choropleth map.
182+
</figcaption>
183+
</figure>
184+
185+
<!-- from http://tristen.ca/hcl-picker/#/clh/8/267/0023A5/F8E0D6 -->
186+
187+
Currently Sass, calc() on HSL values, or PostCSS is used to do this.
188+
However, preprocessors are unable to work on dynamically adjusted colors;
189+
all current solutions are restricted to the sRGB gamut
190+
and to the perceptual limitations of HSL
191+
(colors are bunched up in the color wheel,
192+
and two colors with visually different lightness,
193+
like yellow and blue, can have the same HSL lightness).
194+
195+
To meet this need, the color-mix() function takes two <<color>> specifications
196196
and returns the result of mixing them,
197197
in a given <<color-space>>,
198198
by a specified amount.

0 commit comments

Comments
 (0)
Please sign in to comment.