Skip to content

Commit 9a5e8a0

Browse files
committed
[css-color] Add a CMYK example.
1 parent 81da168 commit 9a5e8a0

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

css-color/Overview.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,21 @@ <h2 class="heading settled heading" data-level=7 id=cmyk-colors><span class=secn
17451745
the computed value of the <a class=css data-link-type=maybe href=#funcdef-device-cmyk title=device-cmyk()>device-cmyk()</a> function must be that RGBA color.
17461746
Otherwise, the computed value must be the fallback color.
17471747

1748+
<div class=example>
1749+
For example, the following colors are equivalent
1750+
(under the default conversion listed above):
1751+
1752+
<pre class=lang-css> color: device-cmyk(0, 81%, 81%, 30%);
1753+
color: rgb(178, 34, 34);
1754+
color: firebrick;
1755+
</pre>
1756+
<p class=note> Note: these colors might not match precisely
1757+
if the browser knows a more precise conversion between CMYK and RGB colors.
1758+
It’s recommended that if authors use <strong>any</strong> CMYK colors in their document,
1759+
that they use <strong>only</strong> CMYK colors in their document
1760+
to avoid any color-matching difficulties.
1761+
</div>
1762+
17481763

17491764
<h2 class="heading settled heading" data-level=8 id=modifying-colors><span class=secno>8 </span><span class=content>
17501765
Modifying Colors: the <a class=css data-link-type=maybe href=#funcdef-color title=color()>color()</a> function</span><a class=self-link href=#modifying-colors></a></h2>

css-color/Overview.src.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,6 +1682,23 @@ <h2 id='cmyk-colors'>
16821682
the computed value of the ''device-cmyk()'' function must be that RGBA color.
16831683
Otherwise, the computed value must be the fallback color.
16841684

1685+
<div class='example'>
1686+
For example, the following colors are equivalent
1687+
(under the default conversion listed above):
1688+
1689+
<pre class="lang-css">
1690+
color: device-cmyk(0, 81%, 81%, 30%);
1691+
color: rgb(178, 34, 34);
1692+
color: firebrick;
1693+
</pre>
1694+
1695+
Note: these colors might not match precisely
1696+
if the browser knows a more precise conversion between CMYK and RGB colors.
1697+
It's recommended that if authors use <strong>any</strong> CMYK colors in their document,
1698+
that they use <strong>only</strong> CMYK colors in their document
1699+
to avoid any color-matching difficulties.
1700+
</div>
1701+
16851702

16861703
<h2 id='modifying-colors'>
16871704
Modifying Colors: the ''color()'' function</h2>

0 commit comments

Comments
 (0)