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
/// stores a list of colors.
///
///
///
/// The vtkColorSeries stores palettes of colors. There are several default
/// palettes (or schemes) available and functions to control several aspects
/// of what colors are returned. In essence a color scheme is set and then
/// the number of colors and individual color values may be requested.
///
/// For a web page showcasing the default palettes, see:
/// <a
/// href="https://htmlpreview.github.io/?https://github.com/Kitware/vtk-examples/blob/gh-pages/VTKColorSeriesPatches.html">VTKColorSeriesPatches</a>;
/// <a
/// href="https://kitware.github.io/vtk-examples/site/Python/Visualization/ColorSeriesPatches/">ColorSeriesPatches</a>
/// was used to generate this table.
///
/// It is also possible to add schemes beyond the default palettes.
/// Whenever \a SetColorScheme is called with a string for which no palette
/// already exists, a new, empty palette is created.
/// You may then use \a SetNumberOfColors and \a SetColor to populate the
/// palette.
/// You may not extend default palettes by calling functions that alter
/// a scheme; if called while a predefined palette is in use, they
/// will create a new non-default scheme and populate it with the current
/// palette before continuing.
///
/// The "Brewer" palettes are courtesy of
/// Cynthia A. Brewer (Dept. of Geography, Pennsylvania State University)
/// and under the Apache License. See the source code for details.
;
/// A class holding colors and their names.
///
///
/// For a web page showcasing VTK Named Colors and their RGB values, see:
/// <a
/// href="https://htmlpreview.github.io/?https://github.com/Kitware/vtk-examples/blob/gh-pages/VTKNamedColorPatches.html">VTKNamedColorPatches</a>;
/// <a
/// href="https://kitware.github.io/vtk-examples/site/Python/Visualization/NamedColorPatches/">NamedColorPatches</a>
/// was used to generate this table.
///
/// Color names are case insensitive and are stored as lower-case names
/// along with a 4-element array whose elements are red, green, blue and alpha,
/// in that order, corresponding to the RGBA value of the color.
///
/// It is assumed that if the RGBA values are unsigned char then each element
/// lies in the range 0...255 and if the RGBA values are double then each
/// element lies in the range 0...1.
///
/// The colors and names are those in <a href="https://en.wikipedia.org/wiki/Web_colors">Web
/// colors</a> that are derived from the CSS3 specification: <a
/// href="https://www.w3.org/TR/css-color-3/">CSS Color Module Level 3</a> In this table
/// common synonyms such as cyan/aqua and magenta/fuchsia are also included.
///
/// Also included in this class are names and colors taken from
/// <em>Wrapping/Python/vtkmodules/util/colors.py</em> that were originally taken from
/// <em>Wrapping/Tcl/vtktesting/colors.tcl</em> (no longer in the VTK source files - deleted
/// 06-Dec-2017).
///
/// Web colors and names in <a href="https://en.wikipedia.org/wiki/Web_colors">Web colors</a> take
/// precedence over those in <em>colors.py</em>. One consequence of this
/// is that while <em>colors.py</em> specifies green as equivalent to
/// (0,255,0), the web color standard defines it as (0,128,0).
///
/// The \a SetColor methods will overwrite existing colors if the name of the
/// color being set matches an existing color. Note that ColorExists() can be
/// used to test for existence of the color being set.
///
/// In the case of the \a GetColor methods returning doubles, alternative versions,
/// identified by the letters RGB in the names, are provided.
/// These get functions return just the red, green and blue components of
/// a color.
///
/// The class also provides methods for defining a color through an HTML color
/// string. The following formats are supported:
///
/// - \#RGB (3-digit hexadecimal number, where #4F2 is a shortcut for #44FF22)
/// - \#RRGGBB (6-digit hexadecimal number)
/// - rgb(r, g, b) (where r, g, b are in 0..255 or percentage values)
/// - rgba(r, g, b, a) (where r, g, b, are in 0..255 or percentage values, a is in 0.0..1.0)
/// - a CSS3 color name (e.g. "steelblue")
;