@@ -2376,18 +2376,36 @@ or any other color or monochrome output device which has been characterized.
2376
2376
2377
2377
<h3 id="resolving-contrast">Resolving ''color-contrast()'' values</h3>
2378
2378
2379
- The computed value is the specified ''color-contrast()'' function
2379
+ The specified value is the ''color-contrast()'' function
2380
2380
with each <<color>> parameter resolved according to [[css-color-4#resolving-color-values]] ,
2381
2381
and the keywords ''AA'' , ''AA-large'' , ''AAA'' , ''AAA-large'' replaced with their corresponding numeric value.
2382
2382
2383
2383
If all <<color>> parameters resolve
2384
2384
to the corresponding colors in their respective color spaces,
2385
- the used value is the winning color
2385
+ the computed value is the winning color
2386
2386
resolved according to [[css-color-4#resolving-color-values]] .
2387
2387
Otherwise (if ''currentColor'' was used in the function),
2388
- the used value is the same as the computed value
2388
+ the computed value is the same as the specified value,
2389
2389
thus preserving inheritance into child elements.
2390
2390
2391
+ <div class="example">
2392
+ For example, given the value
2393
+
2394
+ <pre class="lang-css">
2395
+ color-contrast(rgb(179 213 230) vs cadetblue, hsl(200 83% 23%) to AA)
2396
+ </pre>
2397
+
2398
+ the contrast with cadetblue is <strong> 1.97</strong>
2399
+ while the contrast with hsl(200 83% 23%) is <strong> 6.09</strong>
2400
+ which exceeds 4.5, the value for 'AA' ;
2401
+ so it has the computed value of the resolved hsl function:
2402
+
2403
+ <pre class="lang-css">
2404
+ rgb(10 75 107)
2405
+ </pre>
2406
+
2407
+ </div>
2408
+
2391
2409
<div class="example">
2392
2410
2393
2411
For example, given a current color value of
@@ -2398,7 +2416,7 @@ or any other color or monochrome output device which has been characterized.
2398
2416
color-contrast(currentColor vs hsl(200 83% 23%), purple to AA)
2399
2417
</pre>
2400
2418
2401
- has the computed and used value
2419
+ has the computed value
2402
2420
2403
2421
<pre class="lang-css">
2404
2422
color-contrast(currentColor vs rgb(10 75 107), rgb(128 0 128) to 4.5)
@@ -2408,16 +2426,16 @@ or any other color or monochrome output device which has been characterized.
2408
2426
2409
2427
<h3 id="resolving-mix">Resolving ''color-mix()'' values</h3>
2410
2428
2411
- The computed value is the specified ''color-mix()'' function
2429
+ The specified value is the ''color-mix()'' function
2412
2430
with each <<color>> parameter resolved according to [[css-color-4#resolving-color-values]] .
2413
2431
2414
2432
If all <<color>> parameters resolve
2415
2433
to the corresponding colors in their respective color spaces,
2416
- the used value is the mixed color,
2434
+ the computed value is the mixed color,
2417
2435
in the specified mixing color space,
2418
2436
resolved according to [[css-color-4#resolving-color-values]] .
2419
2437
Otherwise (if ''currentColor'' was used in the function),
2420
- the used value is the same as the computed value
2438
+ the computed value is the same as the specified value
2421
2439
thus preserving inheritance into child elements.
2422
2440
2423
2441
0 commit comments