Skip to content

Commit 791fbd2

Browse files
committed
Merge branch 'master' of github.com:w3c/csswg-drafts
2 parents fd921a3 + 65c0f38 commit 791fbd2

3 files changed

Lines changed: 96 additions & 28 deletions

File tree

css-color-4/Overview.bs

Lines changed: 76 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Ignored Terms: stacking context, double, octet
1818

1919
<pre class="link-defaults">
2020
spec:css-color-4; type:descriptor; for:@color-profile; text:src
21+
spec:css-color-4; type:dfn; text:colorspace
22+
spec:css-color-4; type:dfn; text:gamut
2123
</pre>
2224

2325
<style>
@@ -45,7 +47,9 @@ Introduction</h2>
4547

4648
<em>This section is not normative.</em>
4749

48-
This module describes CSS properties which allow authors to specify the foreground color and opacity of the text content of an element.
50+
This module describes CSS properties which
51+
allow authors to specify
52+
the foreground color and opacity of the text content of an element.
4953
This module also describes in detail the CSS <<color>> value type.
5054

5155

@@ -55,6 +59,66 @@ Introduction</h2>
5559
and <a href="https://www.w3.org/TR/css-color-3/">CSS Color 3</a>,
5660
but also defines new properties and values.
5761

62+
In particular, it allows specifying colors
63+
in other [=colorspaces=] than sRGB;
64+
previously, the more saturated colors ouside the sRGB gamut
65+
could not be used in CSS
66+
even if the display device supported them.
67+
In addition to the family of
68+
<abbr title="red-green-blue">RGB</abbr> colorspaces,
69+
[=colorspaces=] with other primaries
70+
such as <abbr title="cyan-magenta-yellow-black">CMYK</abbr> or
71+
<abbr title="cyan-magenta-yellow-green-orange-violet-black">CMYGOVK</abbr>
72+
are supported.
73+
74+
<h2 id="terminology">Color terminology</h2>
75+
76+
A <dfn>color</dfn> is a definition (numeric or textual)
77+
of the human visual perception of a light
78+
or a physical object illuminated with light.
79+
The objective study of human color perception is termed
80+
<abbr title="colorimetry is the measurement of human color perception">colorimetry</abbr>.
81+
If two objects have different
82+
<abbr title="the amount of light at each wavelength">spectra</abbr>,
83+
but produce the same physical sensation,
84+
we say they have the same color.
85+
86+
<div class="example">For example a green leaf, a photograph of that leaf
87+
displayed on a computer screen, and a print of that photograph,
88+
are all producing a green sensation by different means.
89+
If the screen and the printer are [=calibrated=],
90+
the green in the leaf, and the photo, and the print will look the same.
91+
</div>
92+
93+
A <dfn>colorspace</dfn> is an organization of colors
94+
with respect to an underlying
95+
<abbr title="colorimetry is the measurement of human color perception">colorimetric</abbr>
96+
model,
97+
such that there is a clear, objectively-measurable meaning
98+
for any color in that colorspace.
99+
This also means that the same color can be expressed in multiple colorspaces,
100+
or transformed from one colorspace to another,
101+
while looking the same.
102+
103+
<div class="example"></div>
104+
105+
When the measured physical characteristics
106+
(such as the chromaticities of the primary colors it uses,
107+
or the colors produced in response to a given set of inputs)
108+
of a [=colorspace=] or a color-producing device are known,
109+
it is said to be <dfn>characterised</dfn>.
110+
This characterization information is stored in a <em>profile</em>.
111+
The most common type of color profile is defined by the International Color Consortium (ICC) [[!ICC]].
112+
113+
If in addition adjustments have been made so that a device meets calibration targets
114+
such as white point, neutrality of greys, predictability and consistency of tone response,
115+
then it is said to be <dfn>calibrated</dfn>.
116+
117+
Real physical devices cannot yet produce every possible color that the human eye can see.
118+
The range of colors that a given device can produce is termed the <dfn>gamut</dfn>
119+
<em>not to be confused with gamma</em>.
120+
Devices with a limited gamut cannot produce very saturated colors,
121+
like those found in a rainbow.
58122

59123
<h2 id="the-color-property">
60124
Foreground Color: the 'color' property</h2>
@@ -1907,29 +1971,21 @@ Converting gray colors to sRGB colors</h3>
19071971
<h2 id='icc-colors'>
19081972
Profiled, Device-dependent Colors</h2>
19091973

1910-
When the measured physical characteristics
1911-
(such as the chromaticities of the primary colors it uses,
1912-
or the colors produced in response to a given set of inputs)
1913-
of a color space or a color-producing device are known,
1914-
it is said to be <em>characterised</em>.
1915-
This characterization information is stored in a <em>profile</em>.
1916-
The most common type of color profile is defined by the International Color Consortium (ICC) [[!ICC]].
1917-
1918-
If in addition adjustments have been made so that a device meets calibration targets
1919-
such as white point, neutrality of greys, predictability and consistency of tone response,
1920-
then it is said to be <em>calibrated</em>.
1921-
1922-
CSS allows colors to be specified by reference to a color profile.
1974+
CSS allows [=colors=] to be specified by reference to a color profile.
19231975
This could be for example a calibrated CMYK printer,
1924-
or an RGB colorspace (such as ProPhoto <!-- ref -->, <!-- would be good to mention AdobeRGB 1998 here too, need to check trademark and copyright status first --> widely used by photographers), or any other color or monochrome output device which has been characterized.
1976+
or an RGB colorspace,
1977+
or any other color or monochrome output device which has been characterized.
1978+
19251979
In addition, for convenience,
1926-
CSS provides several <!-- more than 2 now, update text!! --> -->predefined RGB color spaces:
1927-
display-p3 [[!DCI-P3]],
1980+
CSS provides several predefined RGB color spaces
1981+
including ''display-p3''' [[!DCI-P3]],
19281982
which is a wide gamut space typical of current wide-gamut monitors,
1929-
and Rec. 2020 [[!Rec.2020]],
1930-
which is a ultra-wide gamut space capable of representing almost all visible real-world colors.
1931-
Both are broadcast industry standards.
1983+
''prophoto-rgb''', widely used by photographers
1984+
and ''rec-2020''' [[!Rec.2020]],
1985+
which is a broadcast industry standard,
1986+
ultra-wide gamut space capable of representing almost all visible real-world colors.
19321987

1988+
These can be used without supplying a separate profile.
19331989

19341990
<div class='example'>
19351991
This example specifies four profiled colors:

css-color-5/Overview.bs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,27 @@ Abstract: This module extends CSS Color [[css-color-4]] to add color modificatio
1515
Repository: w3c/csswg-drafts
1616
</pre>
1717

18+
<pre class="link-defaults">
19+
spec:css-color-4; type:dfn; text:colorspace
20+
spec:css-color-4; type:dfn; text:gamut
21+
</pre>
22+
1823
Introduction {#intro}
1924
=====================
2025

2126
<em>This section is not normative.</em>
2227

2328
Web developers, design tools and design system developers
24-
often use color functions to assist in scaling the design
29+
often use color functions to assist in scaling the design
2530
of their component color relations.
26-
With the increasing usage of design systems that support multiple platforms
31+
With the increasing usage of design systems that support multiple platforms
2732
and multiple user preferences, like the increased capability of Dark Mode in UI,
2833
this becomes even more useful to not need to manually set color,
2934
and to instead have a single source from which schemes are calculated.
3035

3136
Currently Sass, calc() on HSL values, or PostCSS is used to do this.
32-
Preprocessors are unable to work on dynamically adjusted colors,
33-
all current solutions are restricted to the sRGB gamut
37+
Preprocessors are unable to work on dynamically adjusted colors,
38+
all current solutions are restricted to the sRGB gamut
3439
and to the perceptual limitations of HSL
3540
(colors are bunched up in the color wheel,
3641
and two colors with visually different lightness,
@@ -57,7 +62,7 @@ Mixing colors: the ''color-mix'' function {#colormix}
5762

5863
This function takes two <<color>> specifications
5964
and returns the result of mixing them,
60-
in a given colorspace,
65+
in a given [=colorspace=],
6166
by a specified amount.
6267

6368
Unless otherwise specified,

css-ui-4/Overview.bs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Applies to: all elements
263263
Inherited: no
264264
Percentages: N/A
265265
Computed value: The computed value for ''outline-color/invert'' is ''outline-color/invert''.
266-
For <<color>> values, see <a>resolving color values</a> in [[!CSS-COLOR-4]].
266+
For <<color>> values, see [[!CSS-COLOR-4#resolving-color-values]] in [[!CSS-COLOR-4]].
267267
Animation type: by computed value
268268
</pre>
269269

@@ -932,7 +932,7 @@ Applies to: all elements
932932
Inherited: yes
933933
Percentages: N/A
934934
Computed value: The computed value for ''caret-color/auto'' is ''caret-color/auto''.
935-
For <<color>> values, see <a>resolving color values</a> in [[!CSS-COLOR-4]].
935+
For <<color>> values, see [[!CSS-COLOR-4#resolving-color-values]] in [[!CSS-COLOR-4]].
936936
Animation Type: by computed value
937937
</pre>
938938

@@ -1745,7 +1745,7 @@ without adverse consequences to compatibility,
17451745
so this specification allows flexibility.
17461746

17471747

1748-
<h2 id="styling-widgets" oldids="form-styling control-styling">Styling Widgets</h2>
1748+
<h2 id="styling-widgets" oldids="form-styling, control-styling">Styling Widgets</h2>
17491749

17501750
<h3 id="appearance-switching" caniuse="css-appearance">Switching appearance</h3>
17511751

@@ -2136,17 +2136,24 @@ This appendix is <em>informative</em>.
21362136
<h3 id=changes-22-12-2017 class=no-num>Changes from the
21372137
<a href="https://www.w3.org/TR/2017/WD-css-ui-4-20171222/">22 December 2017 Working Draft</a></h3>
21382138

2139+
In addition to a number of editorial adjustments,
2140+
the following normative changes have been made:
2141+
21392142
<ul>
21402143
<li>Added details about form control specific rendering rules
21412144
<li>Clarify interaction between text-overflow and annonymous block containers
21422145
<li>Require the ''cursor/pointer'' cursor for hyperlinks in all document formats
21432146
<li>Moved the 'box-sizing' and 'text-overflow' properties to [[CSS-SIZING-3]] and [[CSS-OVERFLOW-4]] respectively.
21442147
<li>Changed the requirement that the ''cursor/text'' cursor matches the writing mode from MAY to MUST
2148+
<li>The definition of the appearance property has been significantly reworked to make the design compatible with existing web content
21452149
</ul>
21462150

21472151
<h3 id=changes-22-09-2015 class=no-num>Changes from the
21482152
<a href="https://www.w3.org/TR/2015/WD-css-ui-4-20150922/">22 Sep 2015 First Public Working Draft</a></h3>
21492153

2154+
In addition to a number of editorial adjustments,
2155+
the following normative changes have been made:
2156+
21502157
<ul>
21512158
<li>
21522159
The caret-animation property have been removed.

0 commit comments

Comments
 (0)