| 1 |
\section{Colours and the nuances of a colour} |
| 2 |
|
| 3 |
The key word \texttt{\Lkeyword{fillcolor}=colourname} allows us to specify the wanted colour for the outer faces of a solid. |
| 4 |
The key word \texttt{\texttt{\Lkeyword{incolor}=colourname}} allows us to specify the wanted colour for the inner faces of a solid. |
| 5 |
|
| 6 |
The possible values for \textit{name} are those known to PSTricks (and particularly those of the package \texttt{xcolor}). |
| 7 |
|
| 8 |
We can directly use the colour nuances in the color schemes of |
| 9 |
HSB, RGB or CMYK. In that case we use the key values \Lkeyval{hue}, |
| 10 |
\Lkeyval{inhue} or \Lkeyval{inouthue} for the outer faces, the inner faces, or for all the faces. |
| 11 |
The number of arguments \Lkeyval{hue} determines nuances. |
| 12 |
|
| 13 |
\subsection{Predefined \Index{colours} by the option \texttt{dvipsnames}} |
| 14 |
|
| 15 |
There are $68$~predefined \Index{colours}, which are identified by |
| 16 |
\texttt{solides.pro}: \texttt{Black}, \texttt{White}, and the |
| 17 |
$66$~colours below. |
| 18 |
|
| 19 |
\bgroup\centering |
| 20 |
\newcommand{\colorcube}[1]{% |
| 21 |
\begin{pspicture}(-1.2,-1)(1.2,1) |
| 22 |
\psframe(-1.2,-1)(1.2,1) |
| 23 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=150,lightsrc=viewpoint} |
| 24 |
\psSolid[object=datfile, |
| 25 |
filename=data/cubecolor, |
| 26 |
linewidth=0.07\pslinewidth, |
| 27 |
linecolor=#1!50, |
| 28 |
fillcolor=#1, |
| 29 |
action=draw**] |
| 30 |
\rput(0,-0.75){\footnotesize \texttt{#1}} |
| 31 |
\end{pspicture} |
| 32 |
} |
| 33 |
|
| 34 |
\parindent0pt |
| 35 |
%\parskip-8pt |
| 36 |
\colorcube{GreenYellow} |
| 37 |
\colorcube{Yellow} |
| 38 |
\colorcube{Goldenrod} |
| 39 |
\colorcube{Dandelion} |
| 40 |
\colorcube{Apricot} |
| 41 |
\colorcube{Peach} |
| 42 |
|
| 43 |
\colorcube{Melon} |
| 44 |
\colorcube{YellowOrange} |
| 45 |
\colorcube{Orange} |
| 46 |
\colorcube{BurntOrange} |
| 47 |
\colorcube{Bittersweet} |
| 48 |
\colorcube{RedOrange} |
| 49 |
|
| 50 |
\colorcube{Mahogany} |
| 51 |
\colorcube{Maroon} |
| 52 |
\colorcube{BrickRed} |
| 53 |
\colorcube{Red} |
| 54 |
\colorcube{OrangeRed} |
| 55 |
\colorcube{RubineRed} |
| 56 |
|
| 57 |
\colorcube{WildStrawberry} |
| 58 |
\colorcube{Salmon} |
| 59 |
\colorcube{CarnationPink} |
| 60 |
\colorcube{Magenta} |
| 61 |
\colorcube{VioletRed} |
| 62 |
\colorcube{Rhodamine} |
| 63 |
|
| 64 |
\colorcube{Mulberry} |
| 65 |
\colorcube{RedViolet} |
| 66 |
\colorcube{Fuchsia} |
| 67 |
\colorcube{Lavender} |
| 68 |
\colorcube{Thistle} |
| 69 |
\colorcube{Orchid} |
| 70 |
|
| 71 |
\colorcube{DarkOrchid} |
| 72 |
\colorcube{Purple} |
| 73 |
\colorcube{Plum} |
| 74 |
\colorcube{Violet} |
| 75 |
\colorcube{RoyalPurple} |
| 76 |
\colorcube{BlueViolet} |
| 77 |
|
| 78 |
\colorcube{Periwinkle} |
| 79 |
\colorcube{CadetBlue} |
| 80 |
\colorcube{CornflowerBlue} |
| 81 |
\colorcube{MidnightBlue} |
| 82 |
\colorcube{NavyBlue} |
| 83 |
\colorcube{RoyalBlue} |
| 84 |
|
| 85 |
\colorcube{Blue} |
| 86 |
\colorcube{Cerulean} |
| 87 |
\colorcube{Cyan} |
| 88 |
\colorcube{ProcessBlue} |
| 89 |
\colorcube{SkyBlue} |
| 90 |
\colorcube{Turquoise} |
| 91 |
|
| 92 |
\colorcube{TealBlue} |
| 93 |
\colorcube{Aquamarine} |
| 94 |
\colorcube{BlueGreen} |
| 95 |
\colorcube{Emerald} |
| 96 |
\colorcube{JungleGreen} |
| 97 |
\colorcube{SeaGreen} |
| 98 |
|
| 99 |
\colorcube{Green} |
| 100 |
\colorcube{ForestGreen} |
| 101 |
\colorcube{PineGreen} |
| 102 |
\colorcube{LimeGreen} |
| 103 |
\colorcube{YellowGreen} |
| 104 |
\colorcube{SpringGreen} |
| 105 |
|
| 106 |
\colorcube{OliveGreen} |
| 107 |
\colorcube{RawSienna} |
| 108 |
\colorcube{Sepia} |
| 109 |
\colorcube{Brown} |
| 110 |
\colorcube{Tan} |
| 111 |
\colorcube{Gray} |
| 112 |
|
| 113 |
\egroup |
| 114 |
|
| 115 |
\subsection{Predefined \Index{colours} by the option \texttt{svgnames}} |
| 116 |
|
| 117 |
The following colours are known by PSTricks, when the option \texttt{svgnames} is given. |
| 118 |
These ones are not identified by the file \texttt{solides.pro}: we can use them directly with the option \Lkeyword{fcol}. |
| 119 |
|
| 120 |
\bgroup |
| 121 |
\newcommand{\colorcone}[1]{% |
| 122 |
\begin{pspicture}(-1.2,-1)(1.2,1) |
| 123 |
\psframe(-1.2,-1)(1.2,1) |
| 124 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=150,lightsrc=viewpoint} |
| 125 |
\psSolid[object=cone, |
| 126 |
linewidth=0.07\pslinewidth, |
| 127 |
% linecolor=#1!50, |
| 128 |
fillcolor=#1, |
| 129 |
ngrid=4 12, |
| 130 |
r=0.2,h=0.37, |
| 131 |
action=draw**](0,0,-0.05) |
| 132 |
\rput(0,-0.75){\footnotesize \texttt{#1}} |
| 133 |
\end{pspicture} |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
\parindent0pt |
| 138 |
%\parskip-8pt |
| 139 |
|
| 140 |
These colours are delivered from the package \texttt{xcolor}. |
| 141 |
\bigskip |
| 142 |
|
| 143 |
{\centering |
| 144 |
\colorcone{AliceBlue} |
| 145 |
\colorcone{AntiqueWhite} |
| 146 |
\colorcone{Aqua} |
| 147 |
\colorcone{Aquamarine} |
| 148 |
\colorcone{Azure} |
| 149 |
\colorcone{Beige} |
| 150 |
|
| 151 |
\colorcone{Bisque} |
| 152 |
\colorcone{Black} |
| 153 |
\colorcone{BlanchedAlmond} |
| 154 |
\colorcone{Blue} |
| 155 |
\colorcone{BlueViolet} |
| 156 |
\colorcone{Brown} |
| 157 |
|
| 158 |
\colorcone{BurlyWood} |
| 159 |
\colorcone{CadetBlue} |
| 160 |
\colorcone{Chartreuse} |
| 161 |
\colorcone{Chocolate} |
| 162 |
\colorcone{Coral} |
| 163 |
\colorcone{CornflowerBlue} |
| 164 |
|
| 165 |
\colorcone{Cornsilk} |
| 166 |
\colorcone{Crimson} |
| 167 |
\colorcone{Cyan} |
| 168 |
\colorcone{DarkBlue} |
| 169 |
\colorcone{DarkCyan} |
| 170 |
\colorcone{DarkGoldenrod} |
| 171 |
|
| 172 |
\colorcone{DarkGray} |
| 173 |
\colorcone{DarkGreen} |
| 174 |
\colorcone{DarkGrey} |
| 175 |
\colorcone{DarkKhaki} |
| 176 |
\colorcone{DarkMagenta} |
| 177 |
\colorcone{DarkOliveGreen} |
| 178 |
|
| 179 |
\colorcone{DarkOrange} |
| 180 |
\colorcone{DarkOrchid} |
| 181 |
\colorcone{DarkRed} |
| 182 |
\colorcone{DarkSalmon} |
| 183 |
\colorcone{DarkSeaGreen} |
| 184 |
\colorcone{DarkSlateBlue} |
| 185 |
|
| 186 |
\colorcone{DarkSlateGray} |
| 187 |
\colorcone{DarkSlateGrey} |
| 188 |
\colorcone{DarkTurquoise} |
| 189 |
\colorcone{DarkViolet} |
| 190 |
\colorcone{DeepPink} |
| 191 |
\colorcone{DeepSkyBlue} |
| 192 |
|
| 193 |
\colorcone{DimGray} |
| 194 |
\colorcone{DimGrey} |
| 195 |
\colorcone{DodgerBlue} |
| 196 |
\colorcone{FireBrick} |
| 197 |
\colorcone{FloralWhite} |
| 198 |
\colorcone{ForestGreen} |
| 199 |
|
| 200 |
\colorcone{Fuchsia} |
| 201 |
\colorcone{Gainsboro} |
| 202 |
\colorcone{GhostWhite} |
| 203 |
\colorcone{Gold} |
| 204 |
\colorcone{Goldenrod} |
| 205 |
\colorcone{Gray} |
| 206 |
|
| 207 |
\colorcone{Grey} |
| 208 |
\colorcone{Green} |
| 209 |
\colorcone{GreenYellow} |
| 210 |
\colorcone{Honeydew} |
| 211 |
\colorcone{HotPink} |
| 212 |
\colorcone{IndianRed} |
| 213 |
|
| 214 |
\colorcone{Indigo} |
| 215 |
\colorcone{Ivory} |
| 216 |
\colorcone{Khaki} |
| 217 |
\colorcone{Lavender} |
| 218 |
\colorcone{LavenderBlush} |
| 219 |
\colorcone{LawnGreen} |
| 220 |
|
| 221 |
\colorcone{LemonChiffon} |
| 222 |
\colorcone{LightBlue} |
| 223 |
\colorcone{LightCoral} |
| 224 |
\colorcone{LightCyan} |
| 225 |
\colorcone{LightGoldenrodYellow} |
| 226 |
\colorcone{LightGray} |
| 227 |
|
| 228 |
\colorcone{LightGreen} |
| 229 |
\colorcone{LightGrey} |
| 230 |
\colorcone{LightPink} |
| 231 |
\colorcone{LightSalmon} |
| 232 |
\colorcone{LightSeaGreen} |
| 233 |
\colorcone{LightSkyBlue} |
| 234 |
|
| 235 |
\colorcone{LightSlateGray} |
| 236 |
\colorcone{LightSlateGrey} |
| 237 |
\colorcone{LightSteelBlue} |
| 238 |
\colorcone{LightYellow} |
| 239 |
\colorcone{Lime} |
| 240 |
\colorcone{LimeGreen} |
| 241 |
|
| 242 |
\colorcone{Linen} |
| 243 |
\colorcone{Magenta} |
| 244 |
\colorcone{Maroon} |
| 245 |
\colorcone{MediumAquamarine} |
| 246 |
\colorcone{MediumBlue} |
| 247 |
\colorcone{MediumOrchid} |
| 248 |
|
| 249 |
\colorcone{MediumPurple} |
| 250 |
\colorcone{MediumSeaGreen} |
| 251 |
\colorcone{MediumSlateBlue} |
| 252 |
\colorcone{MediumSpringGreen} |
| 253 |
\colorcone{MediumTurquoise} |
| 254 |
\colorcone{MediumVioletRed} |
| 255 |
|
| 256 |
\colorcone{MidnightBlue} |
| 257 |
\colorcone{MintCream} |
| 258 |
\colorcone{MistyRose} |
| 259 |
\colorcone{Moccasin} |
| 260 |
\colorcone{NavajoWhite} |
| 261 |
\colorcone{Navy} |
| 262 |
|
| 263 |
\colorcone{OldLace} |
| 264 |
\colorcone{Olive} |
| 265 |
\colorcone{OliveDrab} |
| 266 |
\colorcone{Orange} |
| 267 |
\colorcone{OrangeRed} |
| 268 |
\colorcone{Orchid} |
| 269 |
|
| 270 |
\colorcone{PaleGoldenrod} |
| 271 |
\colorcone{PaleGreen} |
| 272 |
\colorcone{PaleTurquoise} |
| 273 |
\colorcone{PaleVioletRed} |
| 274 |
\colorcone{PapayaWhip} |
| 275 |
\colorcone{PeachPuff} |
| 276 |
|
| 277 |
\colorcone{Peru} |
| 278 |
\colorcone{Pink} |
| 279 |
\colorcone{Plum} |
| 280 |
\colorcone{PowderBlue} |
| 281 |
\colorcone{Purple} |
| 282 |
\colorcone{Red} |
| 283 |
|
| 284 |
\colorcone{RosyBrown} |
| 285 |
\colorcone{RoyalBlue} |
| 286 |
\colorcone{SaddleBrown} |
| 287 |
\colorcone{Salmon} |
| 288 |
\colorcone{SandyBrown} |
| 289 |
\colorcone{SeaGreen} |
| 290 |
|
| 291 |
\colorcone{Seashell} |
| 292 |
\colorcone{Sienna} |
| 293 |
\colorcone{Silver} |
| 294 |
\colorcone{SkyBlue} |
| 295 |
\colorcone{SlateBlue} |
| 296 |
\colorcone{SlateGray} |
| 297 |
|
| 298 |
\colorcone{SlateGrey} |
| 299 |
\colorcone{Snow} |
| 300 |
\colorcone{SpringGreen} |
| 301 |
\colorcone{SteelBlue} |
| 302 |
\colorcone{Tan} |
| 303 |
\colorcone{Teal} |
| 304 |
|
| 305 |
\colorcone{Thistle} |
| 306 |
\colorcone{Tomato} |
| 307 |
\colorcone{Turquoise} |
| 308 |
\colorcone{Violet} |
| 309 |
\colorcone{Wheat} |
| 310 |
\colorcone{White} |
| 311 |
|
| 312 |
\colorcone{WhiteSmoke} |
| 313 |
\colorcone{Yellow} |
| 314 |
\colorcone{YellowGreen} |
| 315 |
|
| 316 |
} |
| 317 |
\egroup |
| 318 |
|
| 319 |
\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, \Index{saturation} and maximum \Index{brilliance}} |
| 320 |
|
| 321 |
There are 2 key values: \texttt{\Lkeyword{hue}=$h_0$ $h_1$} where |
| 322 |
the numbers $h_0$ and $h_1$ with $0\leq h_0 < h_1 \leq 1$ |
| 323 |
respect the limits of the colour scheme of HSB. |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 328 |
\begin{LTXexample}[width=7.5cm] |
| 329 |
\psset{unit=1} |
| 330 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 331 |
\psSolid[object=grille, |
| 332 |
base=-3 5 -3 3, |
| 333 |
linecolor=gray, |
| 334 |
hue=0 1](0,0,0) |
| 335 |
\end{pspicture} |
| 336 |
\end{LTXexample} |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 341 |
\begin{LTXexample}[width=7.5cm] |
| 342 |
\psset{unit=1} |
| 343 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 344 |
\psSolid[object=grille, |
| 345 |
base=-3 5 -3 3, |
| 346 |
linecolor=gray, |
| 347 |
hue=0 .3](0,0,0) |
| 348 |
\end{pspicture} |
| 349 |
\end{LTXexample} |
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 354 |
\begin{LTXexample}[width=7.5cm] |
| 355 |
\psset{unit=1} |
| 356 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 357 |
\psSolid[object=grille, |
| 358 |
base=-3 5 -3 3, |
| 359 |
linecolor=gray, |
| 360 |
hue=.5 .6](0,0,0) |
| 361 |
\end{pspicture} |
| 362 |
\end{LTXexample} |
| 363 |
|
| 364 |
|
| 365 |
\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, \Index{saturation} and fixed \Index{brilliance}} |
| 366 |
|
| 367 |
There are 4 key values: \texttt{\Lkeyword{hue}=$h_0$ $h_1$ $s$ $b$} or |
| 368 |
the numbers $h_0$ and $h_1$ with $0\leq h_0 < h_1 \leq 1$ |
| 369 |
respect the limits of the colour scheme HSB and $s$ |
| 370 |
and $b$ are the values for \texttt{saturation} and \texttt{brillance}. |
| 371 |
|
| 372 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 373 |
\begin{LTXexample}[width=7.5cm] |
| 374 |
\psset{unit=1} |
| 375 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 376 |
\psSolid[object=grille, |
| 377 |
base=-3 5 -3 3, |
| 378 |
linecolor=gray, |
| 379 |
hue=0 1 .8 .7](0,0,0) |
| 380 |
\end{pspicture} |
| 381 |
\end{LTXexample} |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 387 |
\begin{LTXexample}[width=7.5cm] |
| 388 |
\psset{unit=1} |
| 389 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 390 |
\psSolid[object=grille, |
| 391 |
base=-3 5 -3 3, |
| 392 |
linecolor=gray, |
| 393 |
hue=0 1 .5 1](0,0,0) |
| 394 |
\end{pspicture} |
| 395 |
\end{LTXexample} |
| 396 |
|
| 397 |
\subsection{Nuances in the \Index{colour scheme} of \Index{HSB}, gneral case} |
| 398 |
|
| 399 |
There are 7 key values: \texttt{\Lkeyword{hue}=$h_0$ $s_0$ $b_0$ $h_1$ $s_1$ |
| 400 |
$b_1$ (hsb)} or the numbers $h_i$, $s_i$ and $b_i$ respecting the limits of the parameters of HSB. |
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 405 |
\begin{LTXexample}[width=7.5cm] |
| 406 |
\psset{unit=1} |
| 407 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 408 |
\psSolid[object=grille, |
| 409 |
base=-3 5 -3 3, |
| 410 |
linecolor=gray, |
| 411 |
hue=0 .8 1 1 1 .7 (hsb)](0,0,0) |
| 412 |
\end{pspicture} |
| 413 |
\end{LTXexample} |
| 414 |
|
| 415 |
\subsection{Nuances in the \Index{colour scheme} of \Index{RGB}} |
| 416 |
|
| 417 |
There are 6 key values: \texttt{\Lkeyword{hue}=$r_0$ $g_0$ $b_0$ $r_1$ $g_1$ |
| 418 |
$b_1$} or the numbers $r_i$, $g_i$ and $b_i$ respecting the limits of the $3$ parameters of RGB. |
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 423 |
\begin{LTXexample}[width=7.5cm] |
| 424 |
\psset{unit=1} |
| 425 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 426 |
\psSolid[object=grille, |
| 427 |
base=-3 5 -3 3, |
| 428 |
linecolor=gray, |
| 429 |
hue=1 0 0 0 0 1](0,0,0) |
| 430 |
\end{pspicture} |
| 431 |
\end{LTXexample} |
| 432 |
|
| 433 |
|
| 434 |
\subsection{Nuances in the \Index{colour scheme} of \Index{CMYK}} |
| 435 |
|
| 436 |
There are 8 key values: \texttt{\Lkeyword{hue}=$c_0$ $m_0$ $y_0$ $k_0$ $c_1$ $m_1$ |
| 437 |
$y_1$ $k_1$} or the numbers $c_i$, $m_i$, $y_i$ and $k_i$ respecting the limits of the $4$ parameters of CMYK. |
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 442 |
\begin{LTXexample}[width=7.5cm] |
| 443 |
\psset{unit=1} |
| 444 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 445 |
\psSolid[object=grille, |
| 446 |
base=-3 5 -3 3, |
| 447 |
linecolor=gray, |
| 448 |
hue=1 0 0 0 0 0 1 0](0,0,0) |
| 449 |
\end{pspicture} |
| 450 |
\end{LTXexample} |
| 451 |
|
| 452 |
\subsection{Nuances between 2 named colours} |
| 453 |
|
| 454 |
There are 2 key values |
| 455 |
\texttt{\Lkeyword{hue}=(color1) (color2)} where |
| 456 |
\texttt{color1} and \texttt{color2} are the names of colours known by \verb+solides.pro+. |
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 461 |
\begin{LTXexample}[width=7.5cm] |
| 462 |
\psset{unit=1} |
| 463 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 464 |
\psSolid[object=grille, |
| 465 |
base=-3 5 -3 3, |
| 466 |
linecolor=gray, |
| 467 |
hue=(jaune) (CadetBlue)](0,0,0) |
| 468 |
\end{pspicture} |
| 469 |
\end{LTXexample} |
| 470 |
|
| 471 |
If we like to use some defined colours of \texttt{xcolor}, we use the |
| 472 |
key values \texttt{color1}, \texttt{color2}, etc. from \Lcs{psSolid}. |
| 473 |
|
| 474 |
\psset{viewpoint=50 50 20 rtp2xyz,Decran=30} |
| 475 |
\begin{LTXexample}[width=7.5cm] |
| 476 |
\psset{unit=1} |
| 477 |
\begin{pspicture}(-4,-1.5)(3,1) |
| 478 |
\psSolid[object=grille, |
| 479 |
base=-3 5 -3 3, |
| 480 |
linecolor=gray, |
| 481 |
color1=red!50, |
| 482 |
color2=green!20, |
| 483 |
hue=(color1) (color2)](0,0,0) |
| 484 |
\end{pspicture} |
| 485 |
\end{LTXexample} |
| 486 |
|
| 487 |
\subsection{Deactivation of the colour application} |
| 488 |
For specific purposes it is possible to disable the application of colour. |
| 489 |
This is particularly the case, when an object is already memorized or defined in external files. |
| 490 |
Within these configurations, if we do not deactivate the colours and |
| 491 |
if we do not define some new colours, these will be the colours by default that overwrite the colours that were defined. |
| 492 |
|
| 493 |
|
| 494 |
To deactivate the colour application we use the option |
| 495 |
\Lkeyword{deactivatecolor}. |
| 496 |
|
| 497 |
\endinput |