Skip to content

Commit 627f172

Browse files
committed
[css-color-4] add more explanation
1 parent 1625dd7 commit 627f172

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

css-color-4/Overview.bs

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Value Definitions</h3>
117117

118118
<h2 id="terminology">Color terminology</h2>
119119

120-
A <dfn>color</dfn> is a definition (numeric or textual)
120+
A <dfn export>color</dfn> is a definition (numeric or textual)
121121
of the human visual perception of a light
122122
or a physical object illuminated with light.
123123
The objective study of human color perception is termed
@@ -163,8 +163,52 @@ Value Definitions</h3>
163163

164164
</div>
165165

166+
An <dfn export>additive colorspace</dfn>
167+
means that the coordinate system is linear in light intensity.
168+
The <abbr title="International Commission on Illumination, = Commission internationale de l'éclairage (in French)">CIE</abbr>
169+
XYZ colorspace is an additive colorspace
170+
(in addition, the Y component of XYZ is the
171+
<abbr title="the intensity per unit area, or 'how bright it is'">luminance</abbr>).
172+
173+
In an additive colorspace, calculations can be done
174+
to accurately predict color mixing. Most RGB spaces
175+
are not additive, because the components are
176+
<em>gamma encoded</em>. Undoing this gamma encoding
177+
produces linear-light values.
178+
179+
<div class="example" id="ex-additivity">
180+
For example, if a light fixture contains two identical colored lights,
181+
and only one is switched on,
182+
and the color is measured to be
183+
<span class="swatch" style="--color: rgb(47.74% 35.59% 21.53%)"></span> color(xyz 0.13 0.12 0.04),
184+
then the color when both are switched on will be exactly twice that,
185+
<span class="swatch" style="--color: rgb(65.57% 49.35% 30.58%)"></span> color(xyz 0.26 0.24 0.08).
186+
187+
If we have two differently colored spotlights shining on a stage,
188+
and one has the measured value
189+
<span class="swatch" style="--color: rgb(0% 60.02% 47.86%)"></span>
190+
color(xyz 0.15 0.24 0.17)
191+
while the other is
192+
<span class="swatch" style="--color: rgb(50.45% 9.53% 31.04%)"></span>
193+
color(xyz 0.11 0.06 0.06)
194+
then we can accurately predict that if the colored beams are made to overlap,
195+
the color of the mixture will be the sum
196+
of the XYZ component values, or
197+
<span class="swatch" style="--color: rgb(75.5% 51.71% 56.61%)"></span>
198+
color(xyz 0.26 0.30 0.23).
199+
</div>
200+
201+
A <dfn export>chromaticity</dfn> is a color measurement
202+
where the lightness component has been factored out.
203+
From the idential lights example above,
204+
the <em>u',v'</em> chromaticity with one light is
205+
(0.2537, 0.5268)
206+
and the chromaticity is the same with both lights
207+
(they are the same color, it is just brighter).
208+
209+
166210
When the measured physical characteristics
167-
(such as the chromaticities of the primary colors it uses,
211+
(such as the <abbr title="measured color, irrespective of lightness">chromaticities</abbr> of the primary colors it uses,
168212
or the colors produced in response to a given set of inputs)
169213
of a [=colorspace=] or a color-producing device are known,
170214
it is said to be <dfn export>characterized</dfn>.
@@ -182,7 +226,7 @@ Value Definitions</h3>
182226
like those found in a rainbow.
183227

184228
The gamuts of different [=colorspace=]s may be compared
185-
by looking at the volume (in cubic LAB units) of colors that can be expressed.
229+
by looking at the volume (in cubic Lab units) of colors that can be expressed.
186230
The following table examines the <a href="#predefined">predefined</a> colorspaces available in CSS.
187231

188232
<table class=gamuts>

0 commit comments

Comments
 (0)