index.html
70.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
<!--
SVG Color 1.2, Part 2: Language
$Id: Overview.html,v 1.11 2009/10/01 01:47:26 clilley Exp $
Note: This document is generated from ../master/SVGColor.html.
Run "make" from ../master/ to regenerate it.
-->
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><title>SVG Color 1.2, Part 2: Language</title><link rel="stylesheet" type="text/css" href="style/svg-style.css"/><link rel="stylesheet" type="text/css" href="style/svg-style-extra.css"/><link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-WD"/></head><body>
<div class="head">
<p><a href="http://www.w3.org/"><img height="48" width="72" src="http://www.w3.org/Icons/w3c_home" alt="W3C"/></a></p>
<h1 id="pagetitle">SVG Color 1.2, Part 2: Language</h1>
<h2 id="pagesubtitle">W3C Working Draft 01 October 2009</h2>
<dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2009/WD-SVGColor12-20091001/">http://www.w3.org/TR/2009/WD-SVGColor12-20091001/</a></dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/SVGColor12/">http://www.w3.org/TR/SVGColor12/</a></dd><dt>Editors:</dt><dd>Chris Lilley, W3C <<a href="mailto:chris@w3.org">chris@w3.org</a>></dd><dd>Anthony Grasso, Canon Information Systems Research Australia, <<a href="mailto:anthony.grasso@research.canon.com.au">anthony.grasso@research.canon.com.au</a>></dd><dt>Authors:</dt><dd>The authors of this specification are the participants of the W3C SVG Working Group.</dd></dl>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2009 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p>
</div>
<hr title="Separator from Header"/>
<h2 id="abstract">Abstract</h2>
<p>
This Working Draft defines features of the Scalable Vector Graphics (SVG) Language
that are specifically for color-managed environments.
</p>
<h2 id="status">Status of This Document</h2>
<p>
<em>This section describes the status of this document at the time of its publication.
Other documents may supersede this document. A list of current W3C publications
and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">
W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
<p>
This document is a First Public Working Draft.
It defines features of SVG specific to color management.
It is a draft in progress; some descriptions in this document may be incomplete.
This document shows the current thoughts of the SVG Working Group on the use of
SVG for color managed environments and should not yet be considered stable. There is an accompanying
<a href="#SVG12ColorPrimer">SVG Color 1.2, Part 1: Primer</a> that lists the ways
SVG Color, along with other SVG documents, may be used.
</p>
<p>
This document has been produced by the <a href="http://www.w3.org/Graphics/SVG/WG">W3C
SVG Working Group</a> as part of the W3C <a href="http://www.w3.org/Graphics/Activity">
Graphics Activity</a> within the <a href="http://www.w3.org/Interaction/">Interaction
Domain</a>. The Working Group expects to advance this Working Draft to Recommendation
Status.
</p>
<p>
We explicitly invite comments on this specification. Please send them to <a href="mailto:www-svg@w3.org">
www-svg@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-svg/">archives</a>).
Acceptance of the archiving policy is requested automatically upon first post to
either list. To subscribe to this list send an email to
<a href="mailto:www-svg-request@w3.org">www-svg-request@w3.org</a>
with the word subscribe in the subject line.
</p>
<p>
Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">
W3C</acronym> Membership. This is a draft document and may be updated, replaced
or obsoleted by other documents at any time. It is inappropriate to cite this document
as other than work in progress.
</p>
<p>
This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">
5 February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent
Policy</a>. <acronym title="World Wide Web Consortium">W3C</acronym> maintains
a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/19480/status">public
list of any patent disclosures</a> made in connection with the deliverables of
the group; that page also includes instructions for disclosing a patent. An individual
who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent
Policy</a>.</p>
<hr/>
<h2 id="howto">
How to read this document and give feedback</h2>
<p>
This draft of SVG Color is a snapshot of a work-in-progress.
</p>
<p>
The main purpose of this document is to encourage public feedback. The best way
to give feedback is by sending an email to <a href="mailto:www-svg@w3.org">
www-svg@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-svg/">archive</a>) .
Please identify in the subject line of your message
the part of the specification to which your comment refers.
If you have comments on multiple areas of this document,
then it is preferable to send several separate comments.
</p>
<p>
The public are welcome to comment on any aspect in this document, but there are
a few areas in which the SVG Working Group are explicitly requesting feedback. These
areas are noted in place within this document.
</p>
<h2 id="toc">Table of Contents</h2>
<ul class="toc">
<li><a href="#introduction">1
Introduction</a></li>
<li><a href="#user-agents">2
User Agents</a></li>
<li><a href="#Color_syntax">3 Color syntax</a><ul class="toc">
<li><a href="#sRGBcolor">3.1
sRGB colors</a></li>
<li><a href="#icc-colors">3.2
ICC colors</a></li>
<li><a href="#LAB">3.3 LAB color</a></li>
<li><a href="#named">3.4
ICC named color</a></li>
<li><a href="#device">3.5
Uncalibrated device color</a></li></ul></li>
<li><a href="#Paint">4
Specifying paint</a></li>
<li><a href="#spec-solid">5 Specifying a solidColor paint server</a></li>
<li><a href="#spec-viewport">6 Specifying a viewportFill</a></li>
<li><a href="#spec-gradients">7 Specifying gradients</a><ul class="toc">
<li><a href="#stop-color_property">7.1 The 'stop-color' property</a></li>
<li><a href="#interpolation">7.2
Color interpolation</a></li></ul></li>
<li><a href="#ColorProfileDescriptions">8 Color profile descriptions</a><ul class="toc">
<li><a href="#ColorProfileDescriptionsOverview">8.1
Overview of color profile descriptions</a></li>
<li><a href="#ColorProfileElement">8.2
The <span class="element-name">‘color-profile’</span> element</a></li></ul></li>
<li><a href="#color-managed-images">9 Color-managed Images</a><ul class="toc">
<li><a href="#ColorProfileProperty">9.1
<span class="prop-name">‘color-profile’</span> property</a></li></ul></li>
<li><a href="#syntax">10 Color syntax</a></li>
<li><a href="#definitions">11
Definitions</a></li>
<li><a href="#references">12
References</a><ul class="toc">
<li><a href="#normref">12.1
Normative References</a></li>
<li><a href="#informref">12.2
Informative References</a></li></ul></li></ul>
<h2 id="introduction">1
Introduction</h2>
<p>
This document lists features that may be used with SVG in color-managed environments,
including document interchange, publishing, and high-quality display.
SVG Color extends the control of color, relative to SVG Tiny 1.2, in three ways. Firstly
by adding an additional color space for interpolation and compositing; this means
that colors are no longer constrained to the sRGB gamut. Secondly by extending the
syntax for Paint, thus allowing colors to be specified as calibrated (ICC and named)
and uncalibrated ('device') color. Thirdly, it andates the color management of embedded images.</p>
<p>
This document is normative.
</p>
<p>
This document contains explicit conformance criteria that overlap with some RNG
definitions in requirements. If there is any conflict between the two, the explicit
conformance criteria are the definitive reference.
</p>
<p>
This document contains conformance criteria for a number of different entities:</p>
<ul><li>The Content (ie. conformance criteria on the document author). </li><li>A Color-managed User Agent (CUA)</li></ul>
<h2 id="user-agents">2
User Agents</h2>
<p>SVG color is an addition to a base profile of the SVG language. A user agent therefore conforms
to at least one base profile (e.g. <a href="http://www.w3.org/TR/SVG11/">SVG 1.1</a> or <a href="http://www.w3.org/TR/SVGTiny12/">SVG Tiny 1.2</a> ) and also to this specification.</p>
<h2 id="Color_syntax">3 Color syntax</h2>
<h3 id="sRGBcolor">3.1
sRGB colors</h3>
<p class="prop-value"><a href="#color"><color></a></p>
<p>Example:</p>
<pre class="examplesource">
<circle fill="rgb(205,133,63)"/>
<circle fill="peru"/>
<circle fill="rgb(80.392%, 52.157%, 24.706%)"/>
<circle fill="#CD853F"/></pre>
<p>
<em>Note:</em> Same syntax as SVG 1.1, extended color keyword list compared to SVG Tiny 1.2</p>
<p>As with SVG 1.1 and SVG Tiny 1.2, colors may be specified in the sRGB color space (see <a href="http://www.iec.ch/nr1899.htm">
[sRGB]</a>). Five syntactical forms are specified for SVG Color, and all of them must be supported in a
conforming Color-managed User Agent:</p>
<dl><dt>Three digit hex — #rgb</dt><dd>Each hexadecimal digit, in the range 0 to F, represents one sRGB color component in the
order red, green and blue. The digits A to F may be in either uppercase or lowercase.
The value of the color component is obtained by replicating digits, so 0 become 00, 1
becomes 11, F becomes FF. This compact syntactical form can represent only 4096 colors.
Examples: <span class="prop-value">#000</span> (i.e. black) <span class="prop-value">#fff</span> (i.e. white) <span class="prop-value">#6CF</span> (i.e. <span class="prop-value">#66CCFF</span>, <span class="prop-value">rgb(102, 204, 255)</span>).</dd><dt>Six digit hex — #rrggbb</dt><dd>Each pair of hexadecimal digits, in the range 0 to F, represents one sRGB color
component in the order red, green and blue. The digits A to F may be in either uppercase
or lowercase.This syntactical form, originally introduced by HTML, can represent
16777216 colors. Examples: <span class="prop-value">#9400D3</span> (i.e. a dark violet), <span class="prop-value">#FFD700</span> (i.e. a golden color). </dd><dt>Integer functional — rgb(rrr, ggg, bbb)</dt><dd>Each integer represents one sRGB color component in the order red, green and blue,
separated by a comma and optionally by white space. Each integer is in the range 0 to
255. This syntactical form can represent 16777216 colors. Examples: <span class="prop-value">rgb(233, 150, 122)</span>
(i.e. a salmon pink), <span class="prop-value">rgb(255, 165, 0)</span> (i.e. an orange).</dd><dt>Float functional — rgb(R%, G%, B%)</dt><dd>Each percentage value represents one sRGB color component in the order red, green and
blue, separated by a comma and optionally by white space. For colors inside the sRGB
gamut, the range of each component is 0.0% to 100.0% and an arbitrary number of decimal
places may be supplied. Scientific notation is not supported. This syntactical form can
represent an arbitrary range of colors, completely covering the sRGB gamut. Color values
where one or more components are below 0.0% or above 100.0% represent colors outside the
sRGB gamut. Examples: <span class="prop-value">rgb(12.375%, 34.286%, 28.97%)</span>.</dd><dt>Color keyword</dt><dd>Originally implemented in HTML browsers and eventually standardized in SVG 1.1, the full list of <a href="http://www.w3.org/TR/SVG11/types.html#ColorKeywords">color keywords</a> and their corresponding sRGB values are given in the SVG 1.1 specification. SVG Tiny 1.2 required only a subset of these, sixteen color keywords. SVG Color requires the full set to be supported.</dd></dl>
<div class="requirement" id="assert_base_syntax">
<p>All the SVG 1.1 syntactic forms for an sRGB color, including the full set of color keywords, shall be supported by a Color-managed User Agent, regardless of the base language profile of SVG.</p>
</div>
<p>Since all Color-managed User Agent are color management
capable, the rendering requirements for sRGB colors are more strict than for SVG 1.1 or SVG Tiny 1.2 User Agents,
where color management is optional.</p>
<div class="requirement" id="assert_render_sRGB">
<p>
When an sRGB color is used - because it is the sole color specification, or in a
permitted fallback situation - a conformant Color-managed User Agent
shall render it in conformance with the ICC profile for sRGB to obtain the
desired color appearance.
</p>
</div>
<h3 id="icc-colors">3.2
ICC colors</h3>
<p class="prop-value"><a href="#fallback"><fallback></a>
<a href="#icccolor"> icc-color(<name> [,<icccolorvalue>]*) </a></p>
<p>Example:</p>
<pre class="examplesource">
<color-profile name="acmecmyk" xlink:href="http://printers.example.com/acmecorp/model1234"/>
<circle fill="#CD853F icc-color(acmecmyk, 0.11, 0.48, 0.83, 0.00)"/></pre>
<p><em>Note:</em> same syntax as SVG 1.1.</p>
<p>SVG Color uses the extended ICC color specification from SVG 1.1. In SVG Tiny 1.2, this was not supported; an SVG Tiny 1.2 user agent which also conforms to this specification is required to support it. In SVG 1.1, parsing the syntax was required but implementing the ICC colour itself was optional, as indicated by phrases such as "If ICC-based colors are provided and the SVG user agent supports ICC color, then...". An SVG 1.1 user agent which also conforms to this specification "supports ICC color" for the purposes of conforming to SVG 1.1.</p>
<p>
As with SVG Full 1.1, SVG Color content may specify color using an ICC profile (see
[<a href="#ref-ICC42">ICC42</a>]); an sRGB fallback must still be provided.
</p>
<p>A Color-managed User Agent searches the color profile description database for
a <a href="#ColorProfileDescriptions">color profile description</a> entry whose
name descriptor matches <name> and uses the last matching entry that is found;
painting shall be done using the given ICC color, where the comma-separated list
(with optional white space) of <strong><icccolorvalue></strong>'s is a set
of ICC-profile-specific color values, expressed as <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeNumber">
<number></a>s (see <a href="#icc-colors">ICC colors</a>). If no match is
found, then the fallback sRGB color is used.
</p>
<div class="requirement" id="assert_ICCColorPrecedence">
<p>
If ICC-based colors are provided, a Color-managed User Agent
MUST use the the ICC-based color in preference to the sRGB fallback color,
unless the ICC color profile cannot be used (is unavailable, malformed, or uses an unsupported profile connection
space).</p>
</div>
<div class="requirement" id="assert_useICC">
<p>When rendering, if both ICC and sRGB fallback colors are provided and the referenced ICC profile ican be used, a Color-managed User Agent MUST render using the ICC color values, and using the specified ICC profile as the input profile.</p>
</div>
<h3 id="LAB">3.3 LAB color</h3>
<p class="prop-value"><a href="#fallback"><fallback></a>
<a href="#cielabcolor">cielab(<Lightness>, <a> <b>)</a> | <br/>
<a href="#fallback"><fallback></a>
<a href="#cielchabcolor">cielchab(<Lightness> <Chroma>, <Hue>)</a>
</p>
<p>Example:</p>
<pre class="examplesource">
<circle fill="#CD853F cielab(62.253188, 23.950124, 48.410653)"/>
<circle fill="#CD853F cielch(62.253188, 54.011108, 63.677091)"/></pre>
<p><em>Note:</em> new in this specification.</p>
<p>A Color-managed User Agent directly uses the CIE LAB or CIE LCHab values, where the comma-separated list
(with optional white space) of <strong><icccolorvalue></strong>'s is a set
of Lightness, a and b or Lightness, Hue and Chroma values, expressed as <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeNumber">
<number></a>s. A fallback sRGB color must still be provided for non-colormanaged user agents.</p>
<h3 id="named">3.4
ICC named color</h3>
<p class="prop-value"><a href="#fallback"><fallback></a>
<a href="#iccnamedcolor">icc-named-color(<name>, <namedColor>)</a></p>
<p>Example:</p>
<pre class="examplesource">
<color-profile name="FooColors" xlink:href="http://swatches.example.com/Foo"/>
<circle fill="#CD853F icc-color(FooColors, Sandy23C"/></pre>
<p><em>Note:</em> new in this specification.</p>
<p>
SVG Color introduces the ability to specify a color using a 'Named Color Profile'.
</p>
<p>A Color-managed User Agent searches the color profile description database for
a <a href="#ColorProfileDescriptions">color profile description</a> entry whose
name descriptor matches <name> and uses the last matching entry that is found;
painting shall be done using the given ICC color, where namedColor is a <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeString">
<string></a> indicating the named color to use.</p>
<div class="requirement" id="assert_ICCNamedColorPrecedence">
<p>
If ICC-based named colors are provided, a conformant Color-managed User Agent
MUST use the the ICC-based named color in preference to the sRGB fallback
color, unless the ICC named color profile is unavailable, malformed, or uses a profile
connection space other than CIE XYZ or CIE LAB.</p>
</div>
<div class="requirement" id="assert_useICCNamed">
<p>
When an ICC named color is used, a conformant Color-managed User Agent
shall render it in conformance with the specified ICC profile to obtain the
desired color appearance.</p>
</div>
<h3 id="device">
Uncalibrated device color</h3>
<p class="prop-value"><a href="#fallback"><fallback></a>
<a href="#devicegray">device-gray(<gray>) </a> | <br/>
<a href="#fallback"><fallback></a>
<a href="#devicergb">device-rgb(<red> <green> <blue>) </a> | <br/>
<a href="#fallback"><fallback></a>
<a href="#devicecmyk">device-cmyk(<cyan> <magenta> <yellow>
<black>) </a> | <br/>
<a href="#fallback"><fallback></a>
<a href="#devicegray">device-nchannel(<number>+) </a> |
</p>
<p><em>Note:</em> new in this specification.</p>
<p>Example:</p>
<pre class="examplesource">
<circle fill="#CD853F device-cmyk(0.11, 0.48, 0.83, 0.00)"/></pre>
<p>
SVG Color also introduces a method of specifying uncallibrated device colors. This
is sometimes useful in print workflows, for example to produce patches of known
ink density used for quality control purposes. </p>
<p>A Color-managed User Agent which supports the indicated class of output device
will pass the values through without color management. If the class of output device
(for example, cmyk) is not supported, then the fallback
sRGB color is used.
</p>
<p>
As these are uncalibrated, any interpolation or compositing occurs using the fallback
sRGB color value.</p>
<p class="note">
Completely different syntax in this version of the specification, responding to
feedback from previous last call and aligning with industry practice.
</p>
<h2 id="Paint">4
Specifying paint</h2>
<p>
The definition of <a href="http://www.w3.org/TR/SVGMobile12/painting.html#SpecifyingPaint">
paint</a> in SVG Tiny 1.2 [SVGT12] is extended by this specification to add the
icc-color values from <a href="http://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint">
paint</a> in SVG Full 1.1 [SVG11] and also to add new values for named colors, CIELAB colors,
and uncalibrated device colors.</p>
<table summary="paint specification" cellspacing="0" cellpadding="0"><tr valign="baseline"><td>
<a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypePaint"><span class="prop-name">
<paint></span> </a>:
</td><td>
<span class="prop-value">none |<br/>
currentColor |<br/>
<a href="#sRGBcolor"><color></a>
|<br/>
<a href="#fallback">fallback</a> <a href="#icc-colors"><icccolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#LAB"><cielabcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#named"><iccnamedcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#device"><devicecolor></a> |<br/>
<a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeFuncIRI"><FuncIRI></a>
[ none | currentColor | <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeColor">
<color></a>] |<br/>
<a href="http://www.w3.org/TR/SVGMobile12/painting.html#systemPaint"><system paint></a>
|
<br/>
<a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit">
<span class="value-inst-inherit noxref">inherit</span> </a></span>
</td></tr></table>
<dl><dt class="prop-value">none </dt><dd>
Indicates that no paint shall be applied.
</dd><dt class="prop-value">currentColor </dt><dd>
Indicates that painting shall be done using the color specified by the current
animated
value of the <a href="http://www.w3.org/TR/SVGMobile12/painting.html#ColorProperty">
<span class="prop-name">‘color’</span> </a>property. This mechanism is provided
to facilitate sharing of color attributes between parent grammars such as other
(non-SVG) XML. This mechanism allows you to define a style in your HTML which sets
the <a href="http://www.w3.org/TR/SVGMobile12/painting.html#ColorProperty"><span class="prop-name">‘color’</span> </a>property and then pass that style to the
<a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermSVGUserAgent"><span class="svg-term">
SVG user agent</span> </a>so that your SVG text will draw in the same color.
</dd><dt class="prop-value"><a href="#sRGBcolor">
<color></a>
</dt><dd>
an <a href="#sRGBcolor">
sRGB color</a>.
</dd><dt class="prop-value"><a href="#icc-colors"><icccolor></a>
</dt><dd>An <a href="#icc-colors">ICC color</a>, plus sRGB fallback..
</dd><dt class="prop-value"><a href="#LAB"><cielabcolor></a></dt><dd>A CIE Lab or CIE LCHab color, plus sRGB fallback.</dd><dt class="prop-value"><a href="#named">
<iccnamedcolor></a>
</dt><dd>
An <a href="#named">ICC named color</a>, plus sRGB fallback.
</dd><dt class="prop-value"><a href="#device">
<devicecolor></a>
</dt><dd>
An uncalibrated <a href="#device">device color</a>, plus sRGB fallback.
</dd><dt class="prop-value"><a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeFuncIRI">
<FuncIRI></a> [ none | currentColor | <a href="#sRGBcolor"><color></a>]
</dt><dd>
The <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeIRI"><FuncIRI></a>
specifies a <a href="http://www.w3.org/TR/SVGMobile12/painting.html#PaintServers">
paint server</a> such as a gradient. The fragment identifier of the <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeIRI">
<FuncIRI></a> provides a link to the paint server (e.g., a <a href="http://www.w3.org/TR/SVGMobile12/painting.html#Gradients">
gradient</a> or <a href="http://www.w3.org/TR/SVGTiny12/painting.html#SolidColorElement"><span class="element-name">‘solidColor’</span>
</a>) that shall be used to paint the current object. The <a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermIRIReference">
<span class="svg-term">IRI reference</span> </a>must be a <a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermLocalIRIReference">
<span class="svg-term">Local IRI reference</span> </a>. If the <a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermLocalIRIReference">
<span class="svg-term">Local IRI reference</span> </a>is not valid (e.g.,
it points to an object that doesn't exist or the object is not a valid paint server),
then the fallback value (if specified) is used; otherwise it must be treated as
if <span class="prop-value">none</span> was specified.
</dd><dt class="prop-value"><system paint></dt><dd>
A <a href="http://www.w3.org/TR/SVGMobile12/painting.html#systemPaint">System Paint
Server</a></dd></dl>
<p>
Note that by default, color <em>interpolation</em> occurs in the sRGB color space,
even if an ICC-based color specification is provided, unless the <a href="#ColorInterpolationProperty">
<span class="prop-name">‘color-interpolation’</span></a> property is set to one
of the CIE Lab color spaces. If an sRGB color interpolation space is specified, all ICC-based colors
used for the interpolation must be converted into the sRGB interpolation colorspace.
</p>
<h2 id="spec-solid">5 Specifying a solidColor paint server</h2>
<p>The <a href="http://www.w3.org/TR/SVGMobile12/painting.html#SolidColorElement">solidColor element</a> in SVG Tiny 1.2 [SVGT12] is extended by this specification to add the
icc-color values from <a href="http://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint">
paint</a> in SVG Full 1.1 [SVG11] and also to add new values for named colors, CIELAB colors,
and uncalibrated device colors.</p>
<div id="SolidColorProperty" class="propdef">
<dl><dt>
<span class="propdef-title prop-name">‘solid-color’</span>
</dt><dd>
<table summary="solid-color property" class="propinfo" cellpadding="0" cellspacing="0"><tbody><tr valign="baseline"><td>
<em>Value:</em>
</td><td>
<span class="prop-value">
currentColor |<br/>
<a href="#sRGBcolor"><color></a>
|<br/>
<a href="#fallback">fallback</a> <a href="#icc-colors"><icccolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#LAB"><cielabcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#named"><iccnamedcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#device"><devicecolor></a> |<br/>
<a href="http://www.w3.org/TR/SVGMobile12/painting.html#systemPaint"><system paint></a>
|
<br/>
<a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit">
<span class="value-inst-inherit noxref">inherit</span> </a></span>
</td></tr><tr valign="baseline"><td>
<em>Initial:</em>
</td><td> black </td></tr><tr valign="baseline"><td>
<em>Applies to:</em>
</td><td>
<a href="http://www.w3.org/TR/SVGTiny12/painting.html#SolidColorElement"><span class="element-name">‘solidColor’</span></a> elements </td></tr><tr valign="baseline"><td>
<em>Inherited:</em>
</td><td> no </td></tr><tr valign="baseline"><td>
<em>Percentages:</em>
</td><td> N/A </td></tr><tr valign="baseline"><td>
<em>Media:</em>
</td><td> visual </td></tr><tr valign="baseline"><td>
<em>Animatable:</em>
</td><td> yes </td></tr><tr valign="baseline"><td>
<em>Computed value:</em> </td><td> Specified <color> value, except inherit </td></tr></tbody></table>
</dd></dl>
</div>
<h2 id="spec-viewport">6 Specifying a viewportFill</h2>
<p>The <a href="http://www.w3.org/TR/SVGMobile12/painting.html#viewport-fill-property">viewportFill element</a> in SVG Tiny 1.2 [SVGT12] is extended by this specification to add the
icc-color values from <a href="http://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint">
paint</a> in SVG Full 1.1 [SVG11] and also to add new values for named colors, CIELAB colors,
and uncalibrated device colors.</p>
<div class="propdef">
<dl><dt>
<span class="propdef-title prop-name">‘viewport-fill’</span>
</dt><dd>
<table summary="viewport-fill property" class="propinfo" cellpadding="0" cellspacing="0"><tbody><tr valign="baseline"><td>
<em>Value:</em>
</td><td>
<span class="prop-value">
none |<br/>
currentColor |<br/>
<a href="#sRGBcolor"><color></a>
|<br/>
<a href="#fallback">fallback</a> <a href="#icc-colors"><icccolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#LAB"><cielabcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#named"><iccnamedcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#device"><devicecolor></a> |<br/>
<a href="http://www.w3.org/TR/SVGMobile12/painting.html#systemPaint"><system paint></a>
|
<br/>
<a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit">
<span class="value-inst-inherit noxref">inherit</span> </a></span>
</td></tr><tr valign="baseline"><td>
<em>Initial:</em>
</td><td> none </td></tr><tr valign="baseline"><td>
<em>Applies to:</em>
</td><td>
<a href="http://www.w3.org/TR/SVGTiny12/coords.html#ElementsThatEstablishViewports">viewport-creating
elements</a>
</td></tr><tr valign="baseline"><td>
<em>Inherited:</em>
</td><td> no </td></tr><tr valign="baseline"><td>
<em>Percentages:</em>
</td><td> N/A </td></tr><tr valign="baseline"><td>
<em>Media:</em>
</td><td> visual </td></tr><tr valign="baseline"><td>
<em>Animatable:</em>
</td><td> yes </td></tr><tr valign="baseline"><td>
<em>Computed value:</em> </td><td> "none" or specified <color> value, except inherit </td></tr></tbody></table>
</dd></dl>
</div>
<h2 id="spec-gradients">7 Specifying gradients</h2>
<p>The gradients in SVG Tiny 1.2 [SVGT12] are extended by this specification. The
<a href="http://www.w3.org/TR/SVGMobile12/painting.html#StopColorProperty">'stop-color' property</a>
s extended by this specification to add the
icc-color values from <a href="http://www.w3.org/TR/SVG11/painting.html#SpecifyingPaint">
paint</a> in SVG Full 1.1 [SVG11] and also to add new values for named colors, CIELAB colors,
and uncalibrated device colors. The <a href="http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperties">color-interpolation property</a> is extended by this specification to add new values using
the CIE L*a*b* color space.</p>
<h3 id="stop-color_property">7.1 The 'stop-color' property</h3>
<p>The <span class="prop-name">‘stop-color’</span> property
indicates what color to use at that gradient stop. The keyword
<span class="attr-value">currentColor</span> and ICC colors can
be specified in the same manner as within a <paint>. This is the same syntax as is used in <a href="http://www.w3.org/TR/SVG11/">SVG 1.1</a>; the
conformance criteria are however more stringent as color management is no longer optional.</p>
<div class="propdef" id="StopColorProperty">
<dl><dt><span class="propdef-title prop-name">‘stop-color’</span></dt><dd>
<table summary="stop-color property" class="propinfo" cellpadding="0" cellspacing="0"><tbody><tr valign="baseline"><td><em>Value:</em> </td><td>
<span class="prop-value">
currentColor |<br/>
<a href="#sRGBcolor"><color></a>
|<br/>
<a href="#fallback">fallback</a> <a href="#icc-colors"><icccolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#LAB"><cielabcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#named"><iccnamedcolor></a> |<br/>
<a href="#fallback">fallback</a> <a href="#device"><devicecolor></a> |<br/>
<a href="http://www.w3.org/TR/SVGMobile12/painting.html#systemPaint"><system paint></a>
|
<br/>
<a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit">
<span class="value-inst-inherit noxref">inherit</span> </a></span>
</td></tr><tr valign="baseline"><td><em>Initial:</em> </td><td>black</td></tr><tr valign="baseline"><td><em>Applies to:</em> </td><td><a href="http://www.w3.org/TR/SVGTiny12/painting.html#StopElement"><span class="element-name">‘stop’</span></a> elements</td></tr><tr valign="baseline"><td><em>Inherited:</em> </td><td>no</td></tr><tr valign="baseline"><td><em>Percentages:</em> </td><td>N/A</td></tr><tr valign="baseline"><td><em>Media:</em> </td><td>visual</td></tr><tr valign="baseline"><td><em><a href="http://www.w3.org/TR/SVGTiny12/animate.html#Animatable">Animatable</a>:</em> </td><td>yes</td></tr></tbody></table>
</dd></dl>
</div>
<p class="note">If any stop-color uses a cmyk color space and stop-opacity is set to any
value other than fully opaque, the result is undefined by this specification. Even for f
ully opaque gradients, the result of interpolating cmyk colors may be unexpected. In general, the use of cmyk (either calibrated or uncalibrated) in gradients is discouraged. </p>
<h3 id="interpolation">7.2
Color interpolation</h3>
<p>
The color-interpolation property, not in SVG Tiny 1.2 but used in <a href="http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperties">
SVG 1.1</a> [SVG11], is extended by this specification to add new values using
the CIE L*a*b* color space. Both the cartesian (<strong>CIE-Lab</strong>) and polar
(<strong>CIE-LCHab</strong>) forms are supported.</p>
<div class="requirement" id="assert_colorInterpolation">
<p>
A Color-managed User Agent MUST use the color space defined by color-interpolation
for calculations when interpolating between gradient stops and alpha compositing
of graphics elements into the current background.
</p>
</div>
<div class="propdef" id="ColorInterpolationProperty">
<dl><dt><span class="propdef-title prop-name">‘color-interpolation’</span></dt><dd>
<table summary="color-interpolation property" class="propinfo" cellpadding="0" cellspacing="0"><tbody><tr valign="baseline"><td>
<em>Value:</em> </td><td>
auto | sRGB | linearRGB | CIE-Lab | CIE-LCHab | <a class="noxref" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit">
<span class="value-inst-inherit noxref">inherit</span></a></td></tr><tr valign="baseline"><td>
<em>Initial:</em> </td><td>
sRGB</td></tr><tr valign="baseline"><td>
<em>Applies to:</em> </td><td>
<a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermContainerElement">container
elements</a>, <a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermGraphicsElement">
graphics elements</a> and <a href="http://www.w3.org/TR/SVGMobile12/animate.html#AnimateColorElement">
<span class="element-name">‘animateColor’</span></a></td></tr><tr valign="baseline"><td>
<em>Inherited:</em> </td><td>
yes</td></tr><tr valign="baseline"><td>
<em>Percentages:</em> </td><td>
N/A</td></tr><tr valign="baseline"><td>
<em>Media:</em> </td><td>
visual</td></tr><tr valign="baseline"><td>
<em><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">Animatable</a>:</em> </td><td>
yes</td></tr></tbody></table>
</dd></dl>
</div>
<dl><dt><strong>auto</strong></dt><dd>
Indicates that the user agent can choose any of the color spaces - <strong>sRGB</strong>,
<strong>linearRGB</strong>, <strong>CIE-Lab</strong> or <strong>CIE-LCHab</strong>-
for color interpolation. This option indicates that the author doesn't require that
color interpolation occur in a particular color space.</dd><dt><strong>sRGB</strong></dt><dd>
Indicates that color interpolation must occur in the sRGB color space defined by
[sRGB].</dd><dt><strong>linearRGB</strong></dt><dd>
Indicates that color interpolation must occur in the linearized RGB color space
(sRGB with a linear transfer function) as defined in [sRGB].</dd><dt><strong>CIE-Lab</strong></dt><dd>
Indicates that color interpolation must occur in the cartesian L*a*b* color space
defined by [CIE15].
</dd><dt><strong>CIE-LCHab</strong></dt><dd>
Indicates that color interpolation must occur in the polar L*CH<sub>ab</sub> color
space defined by [CIE15].
</dd></dl>
<p>
The <span class="prop-name">‘color-interpolation’</span> property specifies the
color space for gradient interpolations and alpha compositing.</p>
<p>
When a child element is blended into a background, the value of the <span class="prop-name">
'color-interpolation'</span> property on the <em>child</em> determines the type
of blending, not the value of the <span class="prop-name">‘color-interpolation’</span>
on the parent.
For <a href="http://www.w3.org/TR/SVGMobile12/painting.html#Gradients">gradients</a>
which make
use of the <a href="http://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute"><span class="attr-name">xlink:href</span></a> attribute to reference
another gradient, the gradient uses the <span class="prop-name">‘color-interpolation’</span> property value
from the gradient element which is directly referenced by the
<a href="http://www.w3.org/TR/SVGTiny12/painting.html#FillProperty"><span class="prop-name">‘fill’</span></a> or
<a href="http://www.w3.org/TR/SVGTiny12/painting.html#StrokeProperty"><span class="prop-name">‘stroke’</span></a> property.
When animating
colors, color interpolation is performed according to the value
of the <span class="prop-name">‘color-interpolation’</span>
property on the element being animated.
</p>
<h2 id="ColorProfileDescriptions">8 Color profile descriptions</h2>
<h3 id="ColorProfileDescriptionsOverview">8.1
Overview of color profile descriptions</h3>
<p>
The <a href="http://www.color.org/">International Color Consortium</a> has established
a standard, the ICC Profile [<a href="http://www.color.org/ICC-1A_1999-04.PDF">ICC32</a>],
for documenting the color characteristics of input and output devices. Using these
profiles, it is possible to build a transform and correct visual data for viewing
on different devices.</p>
<p>
A <span class="SVG-Term">color profile description</span> provides the bridge between
an ICC profile and references to that ICC profile within SVG content. The color
profile description is added to the user agent's list of known color profiles and
then used to select the relevant profile. The color profile description contains
descriptors for the location of the color profile on the Web, a name to reference
the profile and information about rendering intent.</p>
<h3 id="ColorProfileElement">8.2
The <span class="element-name">‘color-profile’</span> element</h3>
<div class="adef-list">
<p>
<em>Attribute definitions:</em></p>
<dl><dt><span class="adef" id="ColorProfileElementHrefAttribute">xlink:href</span> = "<span class="attr-value"><a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeIRI"><iri></a></span>"</dt><dd>
The location of an ICC profile resource.<br/>
<span class="anim-target"><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">
Animatable</a>: no.</span></dd><dt><span class="adef">local</span> = "<span class="attr-value"><string></span>"</dt><dd>
The unique ID for a locally stored color profile. <string> is the profile's
unique ID as specified by <a href="http://www.color.org/">International Color Consortium</a>.
<div class="requirement" id="assert_localColorProfilesFirst">
If both the <a href="#ColorProfileElementHrefAttribute"><span class="attr-name">xlink:href</span></a>
and the <span class="attr-name">local</span> attributes are specified, then the
user agent MUST search the local system for the locally stored color profile first,
and, if not available locally, then attempt to use the resource identified by the
<a href="#ColorProfileElementHrefAttribute"><span class="attr-name">xlink:href</span></a>
attribute.</div>
(Note: Profile description fields do <em>not</em> represent a profile's unique ID.
With current ICC proposals, the profile's unique ID is an MD5-encoded value within
the profile header.).<br/>
<span class="anim-target"><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">
Animatable</a>: no.</span></dd><dt><span class="adef" id="ColorProfileElementNameAttribute">name</span> = "<span class="attr-value"><name></span>"</dt><dd>
The name which is used as the first parameter for <span class="prop-value">icc-color</span>
specifications within <a href="http://www.w3.org/TR/SVGMobile12/painting.html#FillProperty">
<span class="prop-name">‘fill’</span></a>, <a href="http://www.w3.org/TR/SVGMobile12/painting.html#StrokeProperty">
<span class="prop-name">‘stroke’</span></a>, <a href="http://www.w3.org/TR/SVGMobile12/painting.html#StopColorProperty">
<span class="prop-name">‘stop-color’</span></a>, <a href="http://www.w3.org/TR/SVG11/filters.html#FloodColorProperty">
<span class="prop-name">‘flood-color’</span></a> and <a href="http://www.w3.org/TR/SVG11/filters.html#LightingColorProperty">
<span class="prop-name">‘lighting-color’</span></a> property values to
identify the color profile to use for the ICC color specification and the name which
can be the value of the <a href="#ColorProfileProperty"><span class="prop-name">‘color-profile’</span></a>
property. Note that if <name> is not provided, it will be impossible to reference
the given color profile description.
<div class="requirement" id="assert_sRGBPredefinedAndCaseInsensitive">
The name "sRGB" is predefined; any color profile descriptions with <span class="attr-value">
<name></span> set to "sRGB" MUST be ignored. When used in a style sheet,
for consistency with <a href="http://www.w3.org/TR/CSS2/grammar.html">CSS lexical
scanning and parsing rules</a>, the keyword "sRGB" MUST be case-insensitive. However,
it is recommended that the mixed capitalization "sRGB" SHOULD be used for consistency
with common industry practice.</div>
<br/>
<span class="anim-target"><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">
Animatable</a>: no.</span></dd><dt><span class="adef" id="ColorProfileElementRenderingIntentAttribute">rendering-intent</span>
= "<span class="attr-value">auto | perceptual | relative-colorimetric | saturation
| absolute-colorimetric</span>"</dt><dd>
<p>
<span class="prop-name">‘rendering-intent’</span> permits the specification of a
color profile rendering intent other than the default. <span class="prop-name">‘rendering-intent’</span>
is applicable primarily to color profiles corresponding to CMYK color spaces. The
different options cause different methods to be used for translating colors to the
color gamut of the target rendering device:</p>
<dl><dt><strong>auto</strong></dt><dd>
This is the default behavior. The user agent determines the best intent based on
the content type.
<div class="requirement" id="assert_renderingIntentAuto">
For image content containing an embedded profile, the User Agent MUST use the intent
specified within the profile. Otherwise, the user agent MUST use the current profile
and force the intent, overriding any intent that might be stored in the profile
itself.
</div>
</dd><dt><strong>perceptual</strong></dt><dd>
<p>This method is often the preferred choice for images, especially when
there are substantial differences between the source and destination
(such as a CRT display image reproduced on a reflection print). It takes
the colors of the source image and re-optimizes the appearance for the
destination medium using proprietary methods. This re-optimization may
result in colors within both the source and destination gamuts being
changed, although perceptual transforms are supposed to maintain the
basic artistic intent of the original in the reproduction. They will not
attempt to correct errors in the source image.
</p>
<p>NOTE With v2 ICC profiles there is no specified perceptual reference
medium, which can cause interoperability problems. When v2 ICC profiles
are used it may be safer to use the media-relative colorimetric
rendering intent with black point compensation, instead of the perceptual
rendering intent, unless the specific source and destination profiles to
be used have been checked to ensure the combination produces the desired
result.
</p>
<div class="requirement" id="assert_renderingIntentPerceptual">
This method SHOULD maintain relative color values among the pixels as they are mapped
to the target device gamut. This method MAY change pixel values that were originally
within the target device gamut, in order to avoid hue shifts and discontinuities
and to preserve as much as possible the overall appearance of the scene.
</div>
</dd><dt><strong>saturation</strong></dt><dd>
<p>This option was created to preserve the relative saturation (chroma) of
the original, and to keep solid colors pure. However, it experienced
interoperability problems like the perceptual intent, and as solid color
preservation is not amenable to a reference medium solution using v4
profiles does not solve the problem. Use of this rendering intent is <em>not
recommended</em> unless the specific source and destination profiles to be
used have been checked to ensure the combination produces the desired
result.
</p>
<div class="requirement" id="assert_renderingIntentSaturation">
This option SHOULD preserve the relative saturation (chroma) values of the original
pixels. Out of gamut colors SHOULD be converted to colors that have the same saturation
but fall just inside the gamut.
</div>
</dd><dt><strong>relative colorimetric</strong></dt><dd>
<p>Media-relative colorimetric
is required to leave source colors that fall inside the destination
medium gamut unchanged relative to the respective media white points.
Source colors that are out of the destination medium gamut are mapped to
colors on the gamut boundary using a variety of different methods.</p>
<p>NOTE The media-relative colorimetric rendering intent is often used with
black point compensation, where the source medium black point is mapped
to the destination medium black point as well.</p>
<div class="requirement" id="assert_renderingIntentRelativeColorimetric">
This method MUST map the source white point to the desination white point.
If black point compensation is in use, the source black point MUST also be mapped to the destination black point.
Adaptation algorithms MAY be used to adjust for the change in white point. Relative relationships of colors inside
both source and destination gamuts SHOULD be preserved.
Relative relationships of colors outside the destination gamut MAY be changed.
</div>
</dd><dt><strong>absolute colorimetric</strong></dt><dd>
<p>ICC-absolute colorimetric is
required to leave source colors that fall inside the destination medium
gamut unchanged relative to the adopted white (a perfect reflecting
diffuser). Source colors that are out of the destination medium gamut
are mapped to colors on the gamut boundary using a variety of different
methods. This method produces the most accurate color matching of
in-gamut colors, but will result in highlight clipping if the
destination medium white point is lower than the source medium white
point. For this reason it is recommended for use <em>only</em> in applications
that need exact color matching and where highlight clipping is not a
concern.
</p>
<div class="requirement" id="assert_renderingIntentAbsoluteColorimetric">
This method MUST disable white point matching and black point matching when converting colors.
</div>
In general, this option is not recommended.
</dd></dl>
<p><span class="anim-target"><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">
Animatable</a>: no.</span></p>
</dd></dl>
<p class="note">Fallback behaviour needs to be specified, for when the requested rendering intent does not have a corresponding table in the profile; or when all rendering-intents are provided using the same table.</p>
</div>
<h2 id="color-managed-images">9 Color-managed Images</h2>
<p>Implementations of SVG Color are required to color-manage all images. Normally, the embedded profile is used (if there is no embedded profile, sRGB is assumed, for RGB images). </p>
<div class="requirement" id="assert_taggedImages">
<p>
If a referenced image contains color profile information, a
Color-managed User Agent MUST use that profile to render the image, if
the color-profile property has the value 'auto'.
</p>
</div>
<div class="requirement" id="assert_untaggedImages">
<p>
If a referenced image contains no color profile information, a
Color-managed User Agent MUST use the sRGB profile to render the image, if
the color-profile property has the value 'auto'.
</p>
</div>
<p>The color-profile property allows the embedded profile to be overidden.</p>
<div class="requirement" id="assert_overriddenImages">
<p>
If the color-profile property has a value other than 'auto', and the referenced profile is available,
a Color-managed User Agent MUST use the referenced profile to render embedded images,
in preference to any embedded profile.
</p>
</div>
<h3 id="ColorProfileProperty">9.1
<span class="prop-name">‘color-profile’</span> property</h3>
<p class="note">Need to re-examine the use cases for overiding the color profile on embeded images.
the main requirement is to honor any embeded profiles in images, and to interoperably deal with untagged images.</p>
<div class="propdef">
<dl><dt><span class="propdef-title prop-name">‘color-profile’</span></dt><dd>
<table cellpadding="0" cellspacing="0" class="propinfo" summary="color-profile property"><tr valign="baseline"><td>
<em>Value:</em> </td><td>
auto | sRGB | <name> | <a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeIRI">
<iri></a> | <a href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit noxref">inherit</span></a></td></tr><tr valign="baseline"><td>
<em>Initial:</em> </td><td>
auto</td></tr><tr valign="baseline"><td>
<em>Applies to:</em> </td><td>
<a href="http://www.w3.org/TR/SVGMobile12/struct.html#ImageElement"><span class="element-name">
'image'</span></a> elements that refer to raster images</td></tr><tr valign="baseline"><td>
<em>Inherited:</em> </td><td>
yes</td></tr><tr valign="baseline"><td>
<em>Percentages:</em> </td><td>
N/A</td></tr><tr valign="baseline"><td>
<em>Media:</em> </td><td>
visual</td></tr><tr valign="baseline"><td>
<em><a href="http://www.w3.org/TR/SVGMobile12/animate.html#Animatable">Animatable</a>:</em> </td><td>
yes</td></tr></table>
</dd></dl>
</div>
<dl><dt><strong>auto</strong></dt><dd>
This is the default behavior. All colors are presumed to be defined in the sRGB
color space unless a more precise embedded profile is specified within content data.
For images that do have a profile built into their data, that profile is used. For
images that do not have a profile, the sRGB profile is used.</dd><dt><strong>sRGB</strong></dt><dd>
The source profile is assumed to be sRGB. This differs from auto in that it overrides
an embedded profile inside an image.<br/>
<br/>
For consistency with <a href="http://www.w3.org/TR/CSS2/grammar.html">CSS lexical
scanning and parsing rules</a>, the keyword "sRGB" is case-insensitive; however,
it is recommended that the mixed capitalization "sRGB" be used for consistency with
common industry practice.</dd><dt><strong><name></strong></dt><dd>
A name corresponding to a defined color profile that is in the user agent's color
profile description database. The user agent searches the color profile description
database for a <a href="#ColorProfileDescriptions">color profile description</a>
entry whose name descriptor matches <name> and uses the last matching entry
that is found. If a match is found, the corresponding profile overrides an embedded
profile inside an image. If no match is found, then the embedded profile inside
the image is used.</dd><dt><strong><a href="http://www.w3.org/TR/SVGMobile12/types.html#DataTypeIRI"><iri></a></strong></dt><dd>
A <a href="http://www.w3.org/TR/SVGMobile12/intro.html#TermIRIReference">IRI reference</a>
to the source color profile. The referenced color profile overrides an embedded
profile inside the image.</dd></dl>
<div class="note">
</div>
<h2 id="syntax">10 Color syntax</h2>
<p>The EBNF grammar is as used in the <a href="http://www.w3.org/TR/REC-xml/#sec-notation">XML specification</a>,
with the addition of a <em>case-insensitive literal</em>: characters in the ASCII range (only) are case-insensitive. ~"Hello" will match (H|h)(e|e)(l|L)(l|L)(o|O). This makes the productions much easier to read.</p>
<table><tr><td>?</td><td>optional, zero or one</td></tr><tr><td>+</td><td>one or more</td></tr><tr><td>*</td><td>zero or more</td></tr><tr><td>|</td><td>alternation</td></tr><tr><td>"string"</td><td>literal</td></tr><tr><td>~"string"</td><td>case-insensitive literal</td></tr><tr><td>[]</td><td>a character range</td></tr><tr><td>[^]</td><td>excluded character range</td></tr><tr><td>()</td><td>grouping</td></tr></table>
<pre>
<span id="icccolor">icccolor</span> ::=
~"icc-color(" <a href="#name">name</a> (<a href="#comma-wsp">comma-wsp</a> <a href="#number">number</a>)+ ")"
<span id="iccnamedcolor">iccnamedcolor</span> ::=
~"icc-named-color(" <a href="#name">name</a> <a href="#comma-wsp">comma-wsp</a> <a href="#namedColor">namedColor</a> ")"
<span id="cielabcolor">cielabcolor</span> ::=
~"cielab(" <a href="#lightness">lightness</a> <a href="#comma-wsp">comma-wsp</a> <a href="#a-value">a-value</a> <a href="#comma-wsp">comma-wsp</a> <a href="#b-value">b-value</a> ")"
<span id="cielchabcolor">cielchabcolor</span> ::=
~"cielchab(" <a href="#lightness">lightness</a> <a href="#comma-wsp">comma-wsp</a> <a href="#chroma">chroma</a> <a href="#comma-wsp">comma-wsp</a> <a href="#hue">hue</a> ")"
<span id="devicecolor">devicecolor</span> ::=
<a href="#devicegray">device-gray</a> | <a href="#devicergb">devicergb</a> | <a href="#devicecmyk">devicecmyk</a> | <a href="#devicenchannel">devicenchannel</a>
<span id="devicegray">devicegray</span> ::=
~"device-gray(" <a href="#gray">gray</a> ")"
<span id="devicergb">devicergb</span> ::=
~"device-rgb(" <a href="#red">red</a> <a href="#green">green</a> <a href="#blue">blue</a> ")"
<span id="devicecmyk">devicecmyk</span> ::=
~"device-cmyk(" <a href="#cyan">cyan</a> <a href="#magenta">magenta</a> <a href="#yellow">yellow</a> ><a href="#black">black</a> ")"
<span id="devicenchannel">devicenchannel</span> ::=
~"device-nchannel(" <a href="#number">number</a>+ ")"
<span id="name">name</span> ::=
<a href="#namestartchar">namestartchar</a> (<a href="#namechar">namechar</a>)*
<span id="lightness">lightness</span> ::=
<a href="#number">number</a>
<span id="a-value">a-value</span> ::=
<a href="#number">number</a>
<span id="b-value">b-value</span> ::=
<a href="#number">number</a>
<span id="chroma">chroma</span> ::=
<a href="#number">number</a>
<span id="hue">hue</span> ::=
<a href="#number">number</a>
<span id="gray">gray</span> ::=
<a href="#number">number</a>
<span id="red">red</span> ::=
<a href="#number">number</a>
<span id="green">green</span> ::=
<a href="#number">number</a>
<span id="blue">blue</span> ::=
<a href="#number">number</a>
<span id="cyan">cyan</span> ::=
<a href="#number">number</a>
<span id="magenta">magenta</span> ::=
<a href="#number">number</a>
<span id="yellow">yellow</span> ::=
<a href="#number">number</a>
<span id="black">black</span> ::=
<a href="#number">number</a>
<span id="namedColor">namedColor</span> ::=
<a href="#name">name</a>
<span id="fallback">fallback</span> ::=
<a href="#color">color</a>
<span id="color">color</span> ::=
"#" <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> (<a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a> <a href="#hexdigit">hexdigit</a>)?
| ~"rgb(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#comma">comma</a> <a href="#integer">integer</a> <a href="#wsp">wsp</a>* ")"
| ~"rgb(" <a href="#wsp">wsp</a>* <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a href="#comma">comma</a> <a href="#integer">integer</a> "%" <a href="#wsp">wsp</a>* ")"
| <a href="#color-keyword">color-keyword</a>
<span id="hexdigit">hexdigit</span> ::=
[0-9A-Fa-f]
<span id="number">number</span> ::=
<a href="#sign">sign</a>? <a href="#digit-sequence">digit-sequence</a>? "." <a href="#digit-sequence">digit-sequence</a>
<span id="sign">sign</span>::=
"+" | "-"
<span id="integer">integer</span> ::=
<a href="#digit-sequence">digit-sequence</a>
<span id="digit-sequence">digit-sequence</span> ::=
[0-9]+
<span id="namestartchar">namestartchar</span> ::=
":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [
#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] |
[#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] |
[#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
<span id="namechar">namechar</span> ::=
<a href="#namestartchar">namestartchar</a> | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] |
[#x203F-#x2040]
<span id="comma-wsp">comma-wsp</span> ::=
(<a href="#wsp">wsp</a>+ <a href="#comma">comma</a>? <a href="#wsp">wsp</a>*) | (<a href="#comma">comma</a> <a href="#wsp">wsp</a>*)
<span id="comma">comma</span> ::=
","
<span id="wsp">wsp</span> ::=
(#x20 | #x9 | #xD | #xA)
<span id="color-keyword">color-keyword</span> ::=
~"aliceblue" | ~"antiquewhite" | ~"aqua" | ~"aquamarine" | ~"azure" | ~"beige" |
~"bisque" | ~"black" | ~"blanchedalmond" | ~"blue" | ~"blueviolet" | ~"brown" |
~"burlywood" |~"cadetblue" | ~"chartreuse" | ~"chocolate" | ~"coral" | ~"cornflowerblue" |
~"cornsilk" | ~"crimson" | ~"cyan" | ~"darkblue" | ~"darkcyan" | ~"darkgoldenrod" |
~"darkgray" | ~"darkgreen" | ~"darkgrey" | ~"darkkhaki" | ~"darkmagenta" | ~"darkolivegreen" |
~"darkorange" | ~"darkorchid" | ~"darkred" | ~"darksalmon" | ~"darkseagreen" | ~"darkslateblue" |
~"darkslategray" | ~"darkslategrey" | ~"darkturquoise" | ~"darkviolet" | ~"deeppink" | ~"deepskyblue" |
~"dimgray" | ~"dimgrey" | ~"dodgerblue" | ~"firebrick" | ~"floralwhite" | ~"forestgreen" |
~"fuchsia" | ~"gainsboro" | ~"ghostwhite" | ~"gold" | ~"goldenrod" | ~"gray" |
~"grey" | ~"green" | ~"greenyellow" | ~"honeydew" | ~"hotpink" | ~"indianred" |
~"indigo" | ~"ivory" | ~"khaki" | ~"lavender" | ~"lavenderblush" | ~"lawngreen" |
~"lemonchiffon" | ~"lightblue" | ~"lightcoral" | ~"lightcyan" | ~"lightgoldenrodyellow" | ~"lightgray" |
~"lightgreen" | ~"lightgrey" | ~"lightpink" | ~"lightsalmon" | ~"lightseagreen" | ~"lightskyblue" |
~"lightslategray" | ~"lightslategrey" | ~"lightsteelblue" | ~"lightyellow" | ~"lime" |
~"limegreen" | ~"linen" | ~"magenta" | ~"maroon" | ~"mediumaquamarine" | ~"mediumblue" |
~"mediumorchid" | ~"mediumpurple" | ~"mediumseagreen" | ~"mediumslateblue" | ~"mediumspringgreen" | ~"mediumturquoise" |
~"mediumvioletred" | ~"midnightblue" | ~"mintcream" | ~"mistyrose" | ~"moccasin" | ~"navajowhite" |
~"navy" | ~"oldlace" | ~"olive" | ~"olivedrab" | ~"orange" | ~"orangered" |
~"orchid" | ~"palegoldenrod" | ~"palegreen" | ~"paleturquoise" | ~"palevioletred" | ~"papayawhip" |
~"peachpuff" | ~"peru" | ~"pink" | ~"plum" | ~"powderblue" | ~"purple" |
~"red" | ~"rosybrown" | ~"royalblue" | ~"saddlebrown" | ~"salmon" | ~"sandybrown" |
~"seagreen" | ~"seashell" | ~"sienna" | ~"silver" | ~"skyblue" | ~"slateblue" |
~"slategray" | ~"slategrey" | ~"snow" | ~"springgreen" | ~"steelblue" | ~"tan" |
~"teal" | ~"thistle" | ~"tomato" | ~"turquoise" | ~"violet" | ~"wheat" |
~"white" | ~"whitesmoke" | ~"yellow" | ~"yellowgreen"
</pre>
<h2 id="definitions">11
Definitions</h2>
<dl><dt id="dfn-color">color</dt><dd>A sensation caused by the spectral properties of light interacting with the human visual system (eye and brain). </dd><dt id="dfn-color_appearance">color appearance</dt><dd>
Color-appearance models extend basic colorimetry, to the prediction of
color matches and color appearance across varying viewing
conditions, taking into account not just the colorimetry of the color patch in question but also its size and the other colors wehich surround it.</dd><dt id="dfn-color_management">color management</dt><dd>A means of ensuring consistent color reproduction on a range of devices, by taking into account the colorimetric characteristics, gamut and white point of the source image and the output device.</dd><dt id="dfn_color_space">color space</dt><dd>A geometric space, usually three dimensional, in which a range of colors may be placed colorimetricaly. </dd><dt id="dfn-colorimetric">colorimetric</dt><dd>A color which is objectively measured and expressed as tristimulus terms, such as CIE XYZ or CIE LAB. Two colors which have the same colorimerty will appear the same to a normal human observer, even if their spectra are very different.</dd><dt id="dfn-gamut">gamut</dt><dd>
The subset of colors which can be accurately represented in a given colorspace or
displayed on a given output device.</dd><dt id="dfn-metamerism">metamerism</dt><dd>When the color of two physical materials match under one light source, but do not match under different lighting. This is caused by very different reflectance spectra, which only give matching tristimulus values with a restricted range of lighting spectra.</dd><dt id="dfn-perceptually_uniform">perceptually uniform</dt><dd>The closeness of two points in a color space relates to how similar they will appear, but in some color spaces the definition of 'closeness' depends on the position in the space (colors are clumped together or spread apart), leading to complex formulae to compute closeness. For a given color space, if the simple geometric distance of any two points strongly relates to how similar they will appear, that color space is said to be perceptually uniform.</dd></dl>
<h2 id="references">12
References</h2>
<h3 id="normref">12.1
Normative References</h3>
<dl><dt id="ref-CIE"><strong class="normref">[CIE15]</strong></dt><dd>
<cite>International Commission on Illumination (CIE). Colorimetry, 3rd Edition. Publication
CIE 15:2004, ISBN 3-901-906-33-9</cite>
<br/>
Available at <a href="http://www.cie.co.at/publ/abst/15-2004.html">http://www.cie.co.at/publ/abst/15-2004.html</a></dd><dt id="ref-ICC42"><strong class="normref">[ICC42]</strong></dt><dd>
<cite>International Color Consortium. Specification ICC.1:2004-10 (Profile version
4.2.0.0) Image technology colour management — Architecture, profile format, and
data structure.</cite>
<br/>
Available at <a href="http://www.color.org/ICC1V42.pdf">http://www.color.org/ICC1V42.pdf</a></dd><dt id="ref-SRGB"><strong class="normref">[SRGB]</strong></dt><dd>
<cite><a href="http://domino.iec.ch/webstore/webstore.nsf/artnum/025408">IEC 61966-2-1
(1999-10) - "Multimedia systems and equipment - Colour measurement and management
- Part 2-1: Colour management - Default RGB colour space - sRGB</a></cite>, ISBN:
2-8318-4989-6 ICS codes: 33.160.60, 37.080 TC 100 51 pp.<br/>
Available at: <a href="http://domino.iec.ch/webstore/webstore.nsf/artnum/025408">http://domino.iec.ch/webstore/webstore.nsf/artnum/025408</a>.</dd><dt id="ref-SVG12Full"><strong class="normref">[SVG12]</strong></dt><dd>
<strong>Scalable Vector Graphics (SVG) 1.2 Specification</strong>, Dean Jackson
editor, W3C, 27 October 2004 (Working Draft). See <a href="http://www.w3.org/TR/2004/WD-SVG12-20041027/">
http://www.w3.org/TR/2004/WD-SVG12-20041027/</a>
</dd></dl>
<h3 id="informref">12.2
Informative References</h3>
<dl><dt id="ref-BetaRGB"><strong class="informref">[BetaRGB]</strong></dt><dd>
<cite><a href="http://www.brucelindbloom.com/index.html?BetaRGB.html">Beta RGB</a></cite>,
Bruce Justin Lindbloom, 2003.
</dd><dt id="ref-SVG11"><strong class="informref">[SVG11]</strong></dt><dd>
<cite class="w3crec"><a href="http://www.w3.org/TR/2003/REC-SVG11-20030114/">Scalable
Vector Graphics (SVG) 1.1</a></cite>, J. Ferraiolo, <span class="ruby"><span class="rb" lang="ja">藤沢 淳</span> <span class="rp">(</span><span class="rt"><span class="familyname">Fujisawa</span>
Jun</span><span class="rp">)</span></span>, D. Jackson, eds. World Wide Web
Consortium,14 January 2003.<br/>
Latest version available at: <a href="http://www.w3.org/TR/SVG11/">http://www.w3.org/TR/SVG11/</a></dd>
<dt id="SVG12ColorPrimer"><strong class="informref">[SVGColorPrimer]</strong></dt>
<dd><cite><a href="http://www.w3.org/TR/SVGColorPrimer12">SVG Color Primer</a></cite>,
Chris Lilley, Anthony Grasso, eds. World Wide Web
Consortium, 01 October 2009. <br />
Latest version available at: <a href="http://www.w3.org/TR/SVGColorPrimer12">http://www.w3.org/TR/SVGColorPrimer12</a></dd>
</dl>
<script src="style/expanders.js" type="text/javascript"> </script></body></html>