python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package drawing :: Module colors
[hide private]

Source Code for Module igraph.drawing.colors

   1  # vim:ts=4:sw=4:sts=4:et 
   2  # -*- coding: utf-8 -*- 
   3  """ 
   4  Color handling functions. 
   5  """ 
   6   
   7  __license__ = u"""\ 
   8  Copyright (C) 2006-2012  Tamás Nepusz <ntamas@gmail.com> 
   9  Pázmány Péter sétány 1/a, 1117 Budapest, Hungary 
  10   
  11  This program is free software; you can redistribute it and/or modify 
  12  it under the terms of the GNU General Public License as published by 
  13  the Free Software Foundation; either version 2 of the License, or 
  14  (at your option) any later version. 
  15   
  16  This program is distributed in the hope that it will be useful, 
  17  but WITHOUT ANY WARRANTY; without even the implied warranty of 
  18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  19  GNU General Public License for more details. 
  20   
  21  You should have received a copy of the GNU General Public License 
  22  along with this program; if not, write to the Free Software 
  23  Foundation, Inc.,  51 Franklin Street, Fifth Floor, Boston, MA  
  24  02110-1301 USA 
  25  """ 
  26   
  27  from igraph.datatypes import Matrix 
  28  from igraph.utils import str_to_orientation 
  29  from math import ceil 
  30   
  31  __all__ = ["Palette", "GradientPalette", "AdvancedGradientPalette", \ 
  32      "RainbowPalette", "PrecalculatedPalette", "ClusterColoringPalette", \ 
  33      "color_name_to_rgb", "color_name_to_rgba", \ 
  34      "hsv_to_rgb", "hsva_to_rgba", "hsl_to_rgb", "hsla_to_rgba", \ 
  35      "rgb_to_hsv", "rgba_to_hsva", "rgb_to_hsl", "rgba_to_hsla", \ 
  36      "palettes", "known_colors"] 
37 38 -class Palette(object):
39 """Base class of color palettes. 40 41 Color palettes are mappings that assign integers from the range 42 0..M{n-1} to colors (4-tuples). M{n} is called the size or length 43 of the palette. C{igraph} comes with a number of predefined palettes, 44 so this class is useful for you only if you want to define your 45 own palette. This can be done by subclassing this class and implementing 46 the L{Palette._get} method as necessary. 47 48 Palettes can also be used as lists or dicts, for the C{__getitem__} 49 method is overridden properly to call L{Palette.get}. 50 """
51 - def __init__(self, n):
52 self._length = n 53 self._cache = {} 54
55 - def clear_cache(self):
56 """Clears the result cache. 57 58 The return values of L{Palette.get} are cached. Use this method 59 to clear the cache. 60 """ 61 self._cache = {} 62
63 - def get(self, v):
64 """Returns the given color from the palette. 65 66 Values are cached: if the specific value given has already been 67 looked up, its value will be returned from the cache instead of 68 calculating it again. Use L{Palette.clear_cache} to clear the cache 69 if necessary. 70 71 @note: you shouldn't override this method in subclasses, override 72 L{_get} instead. If you override this method, lookups in the 73 L{known_colors} dict won't work, so you won't be able to refer to 74 colors by names or RGBA quadruplets, only by integer indices. The 75 caching functionality will disappear as well. However, 76 feel free to override this method if this is exactly the behaviour 77 you want. 78 79 @param v: the color to be retrieved. If it is an integer, it is 80 passed to L{Palette._get} to be translated to an RGBA quadruplet. 81 Otherwise it is passed to L{color_name_to_rgb()} to determine the 82 RGBA values. 83 84 @return: the color as an RGBA quadruplet""" 85 if isinstance(v, list): 86 v = tuple(v) 87 try: 88 return self._cache[v] 89 except KeyError: 90 pass 91 if isinstance(v, (int, long)): 92 if v < 0: 93 raise IndexError("color index must be non-negative") 94 if v >= self._length: 95 raise IndexError("color index too large") 96 result = self._get(v) 97 else: 98 result = color_name_to_rgba(v) 99 self._cache[v] = result 100 return result 101
102 - def get_many(self, colors):
103 """Returns multiple colors from the palette. 104 105 Values are cached: if the specific value given has already been 106 looked upon, its value will be returned from the cache instead of 107 calculating it again. Use L{Palette.clear_cache} to clear the cache 108 if necessary. 109 110 @param colors: the list of colors to be retrieved. The palette class 111 tries to make an educated guess here: if it is not possible to 112 interpret the value you passed here as a list of colors, the 113 class will simply try to interpret it as a single color by 114 forwarding the value to L{Palette.get}. 115 @return: the colors as a list of RGBA quadruplets. The result will 116 be a list even if you passed a single color index or color name. 117 """ 118 if isinstance(colors, (basestring, int, long)): 119 # Single color name or index 120 return [self.get(colors)] 121 # Multiple colors 122 return [self.get(color) for color in colors] 123
124 - def _get(self, v):
125 """Override this method in a subclass to create a custom palette. 126 127 You can safely assume that v is an integer in the range 0..M{n-1} 128 where M{n} is the size of the palette. 129 130 @param v: numerical index of the color to be retrieved 131 @return: a 4-tuple containing the RGBA values""" 132 raise NotImplementedError("abstract class") 133 134 __getitem__ = get 135 136 @property
137 - def length(self):
138 """Returns the number of colors in this palette""" 139 return self._length 140
141 - def __len__(self):
142 """Returns the number of colors in this palette""" 143 return self._length 144
145 - def __plot__(self, context, bbox, palette, *args, **kwds):
146 """Plots the colors of the palette on the given Cairo context 147 148 Supported keyword arguments are: 149 150 - C{border_width}: line width of the border shown around the palette. 151 If zero or negative, the border is turned off. Default is C{1}. 152 153 - C{grid_width}: line width of the grid that separates palette cells. 154 If zero or negative, the grid is turned off. The grid is also 155 turned off if the size of a cell is less than three times the given 156 line width. Default is C{0}. Fractional widths are also allowed. 157 158 - C{orientation}: the orientation of the palette. Must be one of 159 the following values: C{left-right}, C{bottom-top}, C{right-left} 160 or C{top-bottom}. Possible aliases: C{horizontal} = C{left-right}, 161 C{vertical} = C{bottom-top}, C{lr} = C{left-right}, 162 C{rl} = C{right-left}, C{tb} = C{top-bottom}, C{bt} = C{bottom-top}. 163 The default is C{left-right}. 164 """ 165 border_width = float(kwds.get("border_width", 1.)) 166 grid_width = float(kwds.get("grid_width", 0.)) 167 orientation = str_to_orientation(kwds.get("orientation", "lr")) 168 169 # Construct a matrix and plot that 170 indices = range(len(self)) 171 if orientation in ("rl", "bt"): 172 indices.reverse() 173 if orientation in ("lr", "rl"): 174 matrix = Matrix([indices]) 175 else: 176 matrix = Matrix([[i] for i in indices]) 177 178 return matrix.__plot__(context, bbox, self, style="palette", 179 square=False, grid_width=grid_width, 180 border_width=border_width) 181
182 - def __repr__(self):
183 return "<%s with %d colors>" % (self.__class__.__name__, self._length)
184
185 186 -class GradientPalette(Palette):
187 """Base class for gradient palettes 188 189 Gradient palettes contain a gradient between two given colors. 190 191 Example: 192 193 >>> pal = GradientPalette("red", "blue", 5) 194 >>> pal.get(0) 195 (1.0, 0.0, 0.0, 1.0) 196 >>> pal.get(2) 197 (0.5, 0.0, 0.5, 1.0) 198 >>> pal.get(4) 199 (0.0, 0.0, 1.0, 1.0) 200 """ 201
202 - def __init__(self, color1, color2, n=256):
203 """Creates a gradient palette. 204 205 @param color1: the color where the gradient starts. 206 @param color2: the color where the gradient ends. 207 @param n: the number of colors in the palette. 208 """ 209 Palette.__init__(self, n) 210 self._color1 = color_name_to_rgba(color1) 211 self._color2 = color_name_to_rgba(color2) 212
213 - def _get(self, v):
214 """Returns the color corresponding to the given color index. 215 216 @param v: numerical index of the color to be retrieved 217 @return: a 4-tuple containing the RGBA values""" 218 ratio = float(v)/(len(self)-1) 219 return tuple(self._color1[x]*(1-ratio) + \ 220 self._color2[x]*ratio for x in range(4))
221
222 223 -class AdvancedGradientPalette(Palette):
224 """Advanced gradient that consists of more than two base colors. 225 226 Example: 227 228 >>> pal = AdvancedGradientPalette(["red", "black", "blue"], n=9) 229 >>> pal.get(2) 230 (0.5, 0.0, 0.0, 1.0) 231 >>> pal.get(7) 232 (0.0, 0.0, 0.75, 1.0) 233 """ 234
235 - def __init__(self, colors, indices=None, n=256):
236 """Creates an advanced gradient palette 237 238 @param colors: the colors in the gradient. 239 @param indices: the color indices belonging to the given colors. If 240 C{None}, the colors are distributed equidistantly 241 @param n: the total number of colors in the palette 242 """ 243 Palette.__init__(self, n) 244 245 if indices is None: 246 diff = float(n-1) / (len(colors)-1) 247 indices = [i * diff for i in xrange(len(colors))] 248 elif not hasattr(indices, "__iter__"): 249 indices = [float(x) for x in indices] 250 self._indices, self._colors = zip(*sorted(zip(indices, colors))) 251 self._colors = [color_name_to_rgba(color) for color in self._colors] 252 self._dists = [curr-prev for curr, prev in \ 253 zip(self._indices[1:], self._indices)] 254
255 - def _get(self, v):
256 """Returns the color corresponding to the given color index. 257 258 @param v: numerical index of the color to be retrieved 259 @return: a 4-tuple containing the RGBA values""" 260 colors = self._colors 261 for i in xrange(len(self._indices)-1): 262 if self._indices[i] <= v and self._indices[i+1] >= v: 263 dist = self._dists[i] 264 ratio = float(v-self._indices[i])/dist 265 return tuple([colors[i][x]*(1-ratio)+colors[i+1][x]*ratio \ 266 for x in range(4)]) 267 return (0., 0., 0., 1.)
268
269 -class RainbowPalette(Palette):
270 """A palette that varies the hue of the colors along a scale. 271 272 Colors in a rainbow palette all have the same saturation, value and 273 alpha components, while the hue is varied between two given extremes 274 linearly. This palette has the advantage that it wraps around nicely 275 if the hue is varied between zero and one (which is the default). 276 277 Example: 278 279 >>> pal = RainbowPalette(n=120) 280 >>> pal.get(0) 281 (1.0, 0.0, 0.0, 1.0) 282 >>> pal.get(20) 283 (1.0, 1.0, 0.0, 1.0) 284 >>> pal.get(40) 285 (0.0, 1.0, 0.0, 1.0) 286 >>> pal = RainbowPalette(n=120, s=1, v=0.5, alpha=0.75) 287 >>> pal.get(60) 288 (0.0, 0.5, 0.5, 0.75) 289 >>> pal.get(80) 290 (0.0, 0.0, 0.5, 0.75) 291 >>> pal.get(100) 292 (0.5, 0.0, 0.5, 0.75) 293 >>> pal = RainbowPalette(n=120) 294 >>> pal2 = RainbowPalette(n=120, start=0.5, end=0.5) 295 >>> pal.get(60) == pal2.get(0) 296 True 297 >>> pal.get(90) == pal2.get(30) 298 True 299 300 This palette was modeled after the C{rainbow} command of R. 301 """ 302
303 - def __init__(self, n=256, s=1, v=1, start=0, end=1, alpha=1):
304 """Creates a rainbow palette. 305 306 @param n: the number of colors in the palette. 307 @param s: the saturation of the colors in the palette. 308 @param v: the value component of the colors in the palette. 309 @param start: the hue at which the rainbow begins (between 0 and 1). 310 @param end: the hue at which the rainbow ends (between 0 and 1). 311 @param alpha: the alpha component of the colors in the palette. 312 """ 313 Palette.__init__(self, n) 314 self._s = float(clamp(s, 0, 1)) 315 self._v = float(clamp(v, 0, 1)) 316 self._alpha = float(clamp(alpha, 0, 1)) 317 self._start = float(start) 318 if end == self._start: 319 end += 1 320 self._dh = (end - self._start) / n 321
322 - def _get(self, v):
323 """Returns the color corresponding to the given color index. 324 325 @param v: numerical index of the color to be retrieved 326 @return: a 4-tuple containing the RGBA values""" 327 return hsva_to_rgba(self._start + v * self._dh, 328 self._s, self._v, self._alpha)
329
330 331 -class PrecalculatedPalette(Palette):
332 """A palette that returns colors from a pre-calculated list of colors""" 333
334 - def __init__(self, l):
335 """Creates the palette backed by the given list. The list must contain 336 RGBA quadruplets or color names, which will be resolved first by 337 L{color_name_to_rgba()}. Anything that is understood by 338 L{color_name_to_rgba()} is OK here.""" 339 Palette.__init__(self, len(l)) 340 for idx, color in enumerate(l): 341 if isinstance(color, basestring): 342 color = color_name_to_rgba(color) 343 self._cache[idx] = color 344
345 - def _get(self, v):
346 """This method will only be called if the requested color index is 347 outside the size of the palette. In that case, we throw an exception""" 348 raise ValueError("palette index outside bounds: %s" % v)
349
350 351 -class ClusterColoringPalette(PrecalculatedPalette):
352 """A palette suitable for coloring vertices when plotting a clustering. 353 354 This palette tries to make sure that the colors are easily distinguishable. 355 This is achieved by using a set of base colors and their lighter and darker 356 variants, depending on the number of elements in the palette. 357 358 When the desired size of the palette is less than or equal to the number of 359 base colors (denoted by M{n}), only the bsae colors will be used. When the 360 size of the palette is larger than M{n} but less than M{2*n}, the base colors 361 and their lighter variants will be used. Between M{2*n} and M{3*n}, the 362 base colors and their lighter and darker variants will be used. Above M{3*n}, 363 more darker and lighter variants will be generated, but this makes the individual 364 colors less and less distinguishable. 365 """ 366
367 - def __init__(self, n):
368 base_colors = ["red", "green", "blue", "yellow", \ 369 "magenta", "cyan", "#808080"] 370 base_colors = [color_name_to_rgba(name) for name in base_colors] 371 372 num_base_colors = len(base_colors) 373 colors = base_colors[:] 374 375 blocks_to_add = ceil(float(n - num_base_colors) / num_base_colors) 376 ratio_increment = 1.0 / (ceil(blocks_to_add / 2.0) + 1) 377 378 adding_darker = True 379 ratio = ratio_increment 380 while len(colors) < n: 381 if adding_darker: 382 new_block = [darken(color, ratio) for color in base_colors] 383 else: 384 new_block = [lighten(color, ratio) for color in base_colors] 385 ratio += ratio_increment 386 colors.extend(new_block) 387 adding_darker = not adding_darker 388 389 colors = colors[0:n] 390 PrecalculatedPalette.__init__(self, colors)
391
392 393 -def clamp(value, min_value, max_value):
394 """Clamps the given value between min and max""" 395 if value > max_value: 396 return max_value 397 if value < min_value: 398 return min_value 399 return value 400
401 -def color_name_to_rgb(color, palette=None):
402 """Converts a color given in one of the supported color formats to 403 R-G-B values. 404 405 This is done by calling L{color_name_to_rgba} and then throwing away 406 the alpha value. 407 408 @see: color_name_to_rgba for more details about what formats are 409 understood by this function. 410 """ 411 return color_name_to_rgba(color, palette)[:3] 412
413 -def color_name_to_rgba(color, palette=None):
414 """Converts a color given in one of the supported color formats to 415 R-G-B-A values. 416 417 Examples: 418 419 >>> color_name_to_rgba("red") 420 (1.0, 0.0, 0.0, 1.0) 421 >>> color_name_to_rgba("#ff8000") == (1.0, 128/255.0, 0.0, 1.0) 422 True 423 >>> color_name_to_rgba("#ff800080") == (1.0, 128/255.0, 0.0, 128/255.0) 424 True 425 >>> color_name_to_rgba("#08f") == (0.0, 136/255.0, 1.0, 1.0) 426 True 427 >>> color_name_to_rgba("rgb(100%, 50%, 0%)") 428 (1.0, 0.5, 0.0, 1.0) 429 >>> color_name_to_rgba("rgba(100%, 50%, 0%, 25%)") 430 (1.0, 0.5, 0.0, 0.25) 431 >>> color_name_to_rgba("hsla(120, 100%, 50%, 0.5)") 432 (0.0, 1.0, 0.0, 0.5) 433 >>> color_name_to_rgba("hsl(60, 100%, 50%)") 434 (1.0, 1.0, 0.0, 1.0) 435 >>> color_name_to_rgba("hsv(60, 100%, 100%)") 436 (1.0, 1.0, 0.0, 1.0) 437 438 @param color: the color to be converted in one of the following formats: 439 - B{CSS3 color specification}: C{#rrggbb}, C{#rgb}, C{#rrggbbaa}, C{#rgba}, 440 C{rgb(red, green, blue)}, C{rgba(red, green, blue, alpha)}, 441 C{hsl(hue, saturation, lightness)}, C{hsla(hue, saturation, lightness, alpha)}, 442 C{hsv(hue, saturation, value)} and C{hsva(hue, saturation, value, alpha)} 443 where the components are given as hexadecimal numbers in the first four 444 cases and as decimals or percentages (0%-100%) in the remaining cases. 445 Red, green and blue components are between 0 and 255; hue is between 0 446 and 360; saturation, lightness and value is between 0 and 100; alpha is 447 between 0 and 1. 448 - B{Valid HTML color names}, i.e. those that are present in the HTML 4.0 449 specification 450 - B{Valid X11 color names}, see U{http://en.wikipedia.org/wiki/X11_color_names} 451 - B{Red-green-blue components} given separately in either a comma-, slash- or 452 whitespace-separated string or a list or a tuple, in the range of 0-255. 453 An alpha value of 255 (maximal opacity) will be assumed. 454 - B{Red-green-blue-alpha components} given separately in either a comma-, slash- 455 or whitespace-separated string or a list or a tuple, in the range of 0-255 456 - B{A single palette index} given either as a string or a number. Uses 457 the palette given in the C{palette} parameter of the method call. 458 @param palette: the palette to be used if a single number is passed to 459 the method. Must be an instance of L{colors.Palette}. 460 461 @return: the RGBA values corresponding to the given color in a 4-tuple. 462 Since these colors are primarily used by Cairo routines, the tuples 463 contain floats in the range 0.0-1.0 464 """ 465 if not isinstance(color, basestring): 466 if hasattr(color, "__iter__"): 467 components = list(color) 468 else: 469 # A single index is given as a number 470 try: 471 components = palette.get(color) 472 except AttributeError: 473 raise ValueError("palette index used when no palette was given") 474 if len(components) < 4: 475 components += [1.] * (4 - len(components)) 476 else: 477 if color[0] == '#': 478 color = color[1:] 479 if len(color) == 3: 480 components = [int(i, 16) * 17. / 255. for i in color] 481 components.append(1.0) 482 elif len(color) == 4: 483 components = [int(i, 16) * 17. / 255. for i in color] 484 elif len(color) == 6: 485 components = [int(color[i:i+2], 16) / 255. for i in (0, 2, 4)] 486 components.append(1.0) 487 elif len(color) == 8: 488 components = [int(color[i:i+2], 16) / 255. for i in (0, 2, 4, 6)] 489 elif color.lower() in known_colors: 490 components = known_colors[color.lower()] 491 else: 492 color_mode = "rgba" 493 maximums = (255.0, 255.0, 255.0, 1.0) 494 for mode in ["rgb(", "rgba(", "hsv(", "hsva(", "hsl(", "hsla("]: 495 if color.startswith(mode) and color[-1] == ")": 496 color = color[len(mode):-1] 497 color_mode = mode[:-1] 498 if mode[0] == "h": 499 maximums = (360.0, 100.0, 100.0, 1.0) 500 break 501 502 if " " in color or "/" in color or "," in color: 503 color = color.replace(",", " ").replace("/", " ") 504 components = color.split() 505 for idx, comp in enumerate(components): 506 if comp[-1] == "%": 507 components[idx] = float(comp[:-1])/100. 508 else: 509 components[idx] = float(comp)/maximums[idx] 510 if len(components) < 4: 511 components += [1.] * (4 - len(components)) 512 if color_mode[:3] == "hsv": 513 components = hsva_to_rgba(*components) 514 elif color_mode[:3] == "hsl": 515 components = hsla_to_rgba(*components) 516 else: 517 components = palette.get(int(color)) 518 519 # At this point, the components are floats 520 return tuple(clamp(val, 0., 1.) for val in components) 521
522 -def color_to_html_format(color):
523 """Formats a color given as a 3-tuple or 4-tuple in HTML format. 524 525 The HTML format is simply given by C{#rrggbbaa}, where C{rr} gives 526 the red component in hexadecimal format, C{gg} gives the green 527 component C{bb} gives the blue component and C{gg} gives the 528 alpha level. The alpha level is optional. 529 """ 530 color = [int(clamp(component * 256, 0, 255)) for component in color] 531 if len(color) == 4: 532 return "#{0:02X}{1:02X}{2:02X}{3:02X}".format(*color) 533 return "#{0:02X}{1:02X}{2:02X}".format(*color) 534
535 -def darken(color, ratio=0.5):
536 """Creates a darker version of a color given by an RGB triplet. 537 538 This is done by mixing the original color with black using the given 539 ratio. A ratio of 1.0 will yield a completely black color, a ratio 540 of 0.0 will yield the original color. The alpha values are left intact. 541 """ 542 ratio = 1.0 - ratio 543 red, green, blue, alpha = color 544 return (red * ratio, green * ratio, blue * ratio, alpha) 545
546 -def hsla_to_rgba(h, s, l, alpha = 1.0):
547 """Converts a color given by its HSLA coordinates (hue, saturation, 548 lightness, alpha) to RGBA coordinates. 549 550 Each of the HSLA coordinates must be in the range [0, 1]. 551 """ 552 # This is based on the formulae found at: 553 # http://en.wikipedia.org/wiki/HSL_and_HSV 554 c = s*(1 - 2*abs(l - 0.5)) 555 h1 = (h*6) % 6 556 x = c*(1 - abs(h1 % 2 - 1)) 557 m = l - c/2. 558 h1 = int(h1) 559 if h1 < 3: 560 if h1 < 1: 561 return (c+m, x+m, m, alpha) 562 elif h1 < 2: 563 return (x+m, c+m, m, alpha) 564 else: 565 return (m, c+m, x+m, alpha) 566 else: 567 if h1 < 4: 568 return (m, x+m, c+m, alpha) 569 elif h1 < 5: 570 return (x+m, m, c+m, alpha) 571 else: 572 return (c+m, m, x+m, alpha) 573
574 -def hsl_to_rgb(h, s, l):
575 """Converts a color given by its HSL coordinates (hue, saturation, 576 lightness) to RGB coordinates. 577 578 Each of the HSL coordinates must be in the range [0, 1]. 579 """ 580 return hsla_to_rgba(h, s, l)[:3] 581
582 -def hsva_to_rgba(h, s, v, alpha = 1.0):
583 """Converts a color given by its HSVA coordinates (hue, saturation, 584 value, alpha) to RGB coordinates. 585 586 Each of the HSVA coordinates must be in the range [0, 1]. 587 """ 588 # This is based on the formulae found at: 589 # http://en.wikipedia.org/wiki/HSL_and_HSV 590 c = v*s 591 h1 = (h*6) % 6 592 x = c*(1 - abs(h1 % 2 - 1)) 593 m = v-c 594 h1 = int(h1) 595 if h1 < 3: 596 if h1 < 1: 597 return (c+m, x+m, m, alpha) 598 elif h1 < 2: 599 return (x+m, c+m, m, alpha) 600 else: 601 return (m, c+m, x+m, alpha) 602 else: 603 if h1 < 4: 604 return (m, x+m, c+m, alpha) 605 elif h1 < 5: 606 return (x+m, m, c+m, alpha) 607 else: 608 return (c+m, m, x+m, alpha) 609
610 -def hsv_to_rgb(h, s, v):
611 """Converts a color given by its HSV coordinates (hue, saturation, 612 value) to RGB coordinates. 613 614 Each of the HSV coordinates must be in the range [0, 1]. 615 """ 616 return hsva_to_rgba(h, s, v)[:3] 617
618 -def rgba_to_hsla(r, g, b, alpha=1.0):
619 """Converts a color given by its RGBA coordinates to HSLA coordinates 620 (hue, saturation, lightness, alpha). 621 622 Each of the RGBA coordinates must be in the range [0, 1]. 623 """ 624 alpha = float(alpha) 625 rgb_min, rgb_max = float(min(r, g, b)), float(max(r, g, b)) 626 627 if rgb_min == rgb_max: 628 return 0.0, 0.0, rgb_min, alpha 629 630 lightness = (rgb_min + rgb_max) / 2.0 631 d = rgb_max - rgb_min 632 if lightness > 0.5: 633 sat = d / (2 - rgb_max - rgb_min) 634 else: 635 sat = d / (rgb_max + rgb_min) 636 637 d *= 6.0 638 if rgb_max == r: 639 hue = (g - b) / d 640 if g < b: 641 hue += 1 642 elif rgb_max == g: 643 hue = 1/3.0 + (b - r) / d 644 else: 645 hue = 2/3.0 + (r - g) / d 646 return hue, sat, lightness, alpha 647
648 -def rgba_to_hsva(r, g, b, alpha=1.0):
649 """Converts a color given by its RGBA coordinates to HSVA coordinates 650 (hue, saturation, value, alpha). 651 652 Each of the RGBA coordinates must be in the range [0, 1]. 653 """ 654 # This is based on the formulae found at: 655 # http://en.literateprograms.org/RGB_to_HSV_color_space_conversion_(C) 656 rgb_min, rgb_max = float(min(r, g, b)), float(max(r, g, b)) 657 alpha = float(alpha) 658 value = float(rgb_max) 659 if value <= 0: 660 return 0.0, 0.0, 0.0, alpha 661 sat = 1.0 - rgb_min / value 662 if sat <= 0: 663 return 0.0, 0.0, value, alpha 664 d = rgb_max - rgb_min 665 r = (r - rgb_min) / d 666 g = (g - rgb_min) / d 667 b = (b - rgb_min) / d 668 rgb_max = max(r, g, b) 669 if rgb_max == r: 670 hue = 0.0 + (g - b) / 6.0 671 if hue < 0: 672 hue += 1 673 elif rgb_max == g: 674 hue = 1/3.0 + (b - r) / 6.0 675 else: 676 hue = 2/3.0 + (r - g) / 6.0 677 return hue, sat, value, alpha 678
679 -def rgb_to_hsl(r, g, b):
680 """Converts a color given by its RGB coordinates to HSL coordinates 681 (hue, saturation, lightness). 682 683 Each of the RGB coordinates must be in the range [0, 1]. 684 """ 685 return rgba_to_hsla(r, g, b)[:3] 686
687 -def rgb_to_hsv(r, g, b):
688 """Converts a color given by its RGB coordinates to HSV coordinates 689 (hue, saturation, value). 690 691 Each of the RGB coordinates must be in the range [0, 1]. 692 """ 693 return rgba_to_hsva(r, g, b)[:3] 694
695 -def lighten(color, ratio=0.5):
696 """Creates a lighter version of a color given by an RGB triplet. 697 698 This is done by mixing the original color with white using the given 699 ratio. A ratio of 1.0 will yield a completely white color, a ratio 700 of 0.0 will yield the original color. 701 """ 702 red, green, blue, alpha = color 703 return (red + (1.0 - red) * ratio, green + (1.0 - green) * ratio, 704 blue + (1.0 - blue) * ratio, alpha) 705 706 known_colors = \ 707 { 'alice blue': (0.94117647058823528, 0.97254901960784312, 1.0, 1.0), 708 'aliceblue': (0.94117647058823528, 0.97254901960784312, 1.0, 1.0), 709 'antique white': ( 0.98039215686274506, 710 0.92156862745098034, 711 0.84313725490196079, 712 1.0), 713 'antiquewhite': ( 0.98039215686274506, 714 0.92156862745098034, 715 0.84313725490196079, 716 1.0), 717 'antiquewhite1': (1.0, 0.93725490196078431, 0.85882352941176465, 1.0), 718 'antiquewhite2': ( 0.93333333333333335, 719 0.87450980392156863, 720 0.80000000000000004, 721 1.0), 722 'antiquewhite3': ( 0.80392156862745101, 723 0.75294117647058822, 724 0.69019607843137254, 725 1.0), 726 'antiquewhite4': ( 0.54509803921568623, 727 0.51372549019607838, 728 0.47058823529411764, 729 1.0), 730 'aqua': (0.0, 1.0, 1.0, 1.0), 731 'aquamarine': (0.49803921568627452, 1.0, 0.83137254901960789, 1.0), 732 'aquamarine1': (0.49803921568627452, 1.0, 0.83137254901960789, 1.0), 733 'aquamarine2': ( 0.46274509803921571, 734 0.93333333333333335, 735 0.77647058823529413, 736 1.0), 737 'aquamarine3': ( 0.40000000000000002, 738 0.80392156862745101, 739 0.66666666666666663, 740 1.0), 741 'aquamarine4': ( 0.27058823529411763, 742 0.54509803921568623, 743 0.45490196078431372, 744 1.0), 745 'azure': (0.94117647058823528, 1.0, 1.0, 1.0), 746 'azure1': (0.94117647058823528, 1.0, 1.0, 1.0), 747 'azure2': ( 0.8784313725490196, 748 0.93333333333333335, 749 0.93333333333333335, 750 1.0), 751 'azure3': ( 0.75686274509803919, 752 0.80392156862745101, 753 0.80392156862745101, 754 1.0), 755 'azure4': ( 0.51372549019607838, 756 0.54509803921568623, 757 0.54509803921568623, 758 1.0), 759 'beige': ( 0.96078431372549022, 760 0.96078431372549022, 761 0.86274509803921573, 762 1.0), 763 'bisque': (1.0, 0.89411764705882357, 0.7686274509803922, 1.0), 764 'bisque1': (1.0, 0.89411764705882357, 0.7686274509803922, 1.0), 765 'bisque2': ( 0.93333333333333335, 766 0.83529411764705885, 767 0.71764705882352942, 768 1.0), 769 'bisque3': ( 0.80392156862745101, 770 0.71764705882352942, 771 0.61960784313725492, 772 1.0), 773 'bisque4': ( 0.54509803921568623, 774 0.49019607843137253, 775 0.41960784313725491, 776 1.0), 777 'black': (0.0, 0.0, 0.0, 1.0), 778 'blanched almond': (1.0, 0.92156862745098034, 0.80392156862745101, 1.0), 779 'blanchedalmond': (1.0, 0.92156862745098034, 0.80392156862745101, 1.0), 780 'blue': (0.0, 0.0, 1.0, 1.0), 781 'blue violet': ( 0.54117647058823526, 782 0.16862745098039217, 783 0.88627450980392153, 784 1.0), 785 'blue1': (0.0, 0.0, 1.0, 1.0), 786 'blue2': (0.0, 0.0, 0.93333333333333335, 1.0), 787 'blue3': (0.0, 0.0, 0.80392156862745101, 1.0), 788 'blue4': (0.0, 0.0, 0.54509803921568623, 1.0), 789 'blueviolet': ( 0.54117647058823526, 790 0.16862745098039217, 791 0.88627450980392153, 792 1.0), 793 'brown': ( 0.6470588235294118, 794 0.16470588235294117, 795 0.16470588235294117, 796 1.0), 797 'brown1': (1.0, 0.25098039215686274, 0.25098039215686274, 1.0), 798 'brown2': ( 0.93333333333333335, 799 0.23137254901960785, 800 0.23137254901960785, 801 1.0), 802 'brown3': ( 0.80392156862745101, 803 0.20000000000000001, 804 0.20000000000000001, 805 1.0), 806 'brown4': ( 0.54509803921568623, 807 0.13725490196078433, 808 0.13725490196078433, 809 1.0), 810 'burlywood': ( 0.87058823529411766, 811 0.72156862745098038, 812 0.52941176470588236, 813 1.0), 814 'burlywood1': (1.0, 0.82745098039215681, 0.60784313725490191, 1.0), 815 'burlywood2': ( 0.93333333333333335, 816 0.77254901960784317, 817 0.56862745098039214, 818 1.0), 819 'burlywood3': ( 0.80392156862745101, 820 0.66666666666666663, 821 0.49019607843137253, 822 1.0), 823 'burlywood4': ( 0.54509803921568623, 824 0.45098039215686275, 825 0.33333333333333331, 826 1.0), 827 'cadet blue': ( 0.37254901960784315, 828 0.61960784313725492, 829 0.62745098039215685, 830 1.0), 831 'cadetblue': ( 0.37254901960784315, 832 0.61960784313725492, 833 0.62745098039215685, 834 1.0), 835 'cadetblue1': (0.59607843137254901, 0.96078431372549022, 1.0, 1.0), 836 'cadetblue2': ( 0.55686274509803924, 837 0.89803921568627454, 838 0.93333333333333335, 839 1.0), 840 'cadetblue3': ( 0.47843137254901963, 841 0.77254901960784317, 842 0.80392156862745101, 843 1.0), 844 'cadetblue4': ( 0.32549019607843138, 845 0.52549019607843139, 846 0.54509803921568623, 847 1.0), 848 'chartreuse': (0.49803921568627452, 1.0, 0.0, 1.0), 849 'chartreuse1': (0.49803921568627452, 1.0, 0.0, 1.0), 850 'chartreuse2': (0.46274509803921571, 0.93333333333333335, 0.0, 1.0), 851 'chartreuse3': (0.40000000000000002, 0.80392156862745101, 0.0, 1.0), 852 'chartreuse4': (0.27058823529411763, 0.54509803921568623, 0.0, 1.0), 853 'chocolate': ( 0.82352941176470584, 854 0.41176470588235292, 855 0.11764705882352941, 856 1.0), 857 'chocolate1': (1.0, 0.49803921568627452, 0.14117647058823529, 1.0), 858 'chocolate2': ( 0.93333333333333335, 859 0.46274509803921571, 860 0.12941176470588237, 861 1.0), 862 'chocolate3': ( 0.80392156862745101, 863 0.40000000000000002, 864 0.11372549019607843, 865 1.0), 866 'chocolate4': ( 0.54509803921568623, 867 0.27058823529411763, 868 0.074509803921568626, 869 1.0), 870 'coral': (1.0, 0.49803921568627452, 0.31372549019607843, 1.0), 871 'coral1': (1.0, 0.44705882352941179, 0.33725490196078434, 1.0), 872 'coral2': ( 0.93333333333333335, 873 0.41568627450980394, 874 0.31372549019607843, 875 1.0), 876 'coral3': ( 0.80392156862745101, 877 0.35686274509803922, 878 0.27058823529411763, 879 1.0), 880 'coral4': ( 0.54509803921568623, 881 0.24313725490196078, 882 0.18431372549019609, 883 1.0), 884 'cornflower blue': ( 0.39215686274509803, 885 0.58431372549019611, 886 0.92941176470588238, 887 1.0), 888 'cornflowerblue': ( 0.39215686274509803, 889 0.58431372549019611, 890 0.92941176470588238, 891 1.0), 892 'cornsilk': (1.0, 0.97254901960784312, 0.86274509803921573, 1.0), 893 'cornsilk1': (1.0, 0.97254901960784312, 0.86274509803921573, 1.0), 894 'cornsilk2': ( 0.93333333333333335, 895 0.90980392156862744, 896 0.80392156862745101, 897 1.0), 898 'cornsilk3': ( 0.80392156862745101, 899 0.78431372549019607, 900 0.69411764705882351, 901 1.0), 902 'cornsilk4': ( 0.54509803921568623, 903 0.53333333333333333, 904 0.47058823529411764, 905 1.0), 906 'cyan': (0.0, 1.0, 1.0, 1.0), 907 'cyan1': (0.0, 1.0, 1.0, 1.0), 908 'cyan2': (0.0, 0.93333333333333335, 0.93333333333333335, 1.0), 909 'cyan3': (0.0, 0.80392156862745101, 0.80392156862745101, 1.0), 910 'cyan4': (0.0, 0.54509803921568623, 0.54509803921568623, 1.0), 911 'dark blue': (0.0, 0.0, 0.54509803921568623, 1.0), 912 'dark cyan': (0.0, 0.54509803921568623, 0.54509803921568623, 1.0), 913 'dark goldenrod': ( 0.72156862745098038, 914 0.52549019607843139, 915 0.043137254901960784, 916 1.0), 917 'dark gray': ( 0.66274509803921566, 918 0.66274509803921566, 919 0.66274509803921566, 920 1.0), 921 'dark green': (0.0, 0.39215686274509803, 0.0, 1.0), 922 'dark grey': ( 0.66274509803921566, 923 0.66274509803921566, 924 0.66274509803921566, 925 1.0), 926 'dark khaki': ( 0.74117647058823533, 927 0.71764705882352942, 928 0.41960784313725491, 929 1.0), 930 'dark magenta': (0.54509803921568623, 0.0, 0.54509803921568623, 1.0), 931 'dark olive green': ( 0.33333333333333331, 932 0.41960784313725491, 933 0.18431372549019609, 934 1.0), 935 'dark orange': (1.0, 0.5490196078431373, 0.0, 1.0), 936 'dark orchid': ( 0.59999999999999998, 937 0.19607843137254902, 938 0.80000000000000004, 939 1.0), 940 'dark red': (0.54509803921568623, 0.0, 0.0, 1.0), 941 'dark salmon': ( 0.9137254901960784, 942 0.58823529411764708, 943 0.47843137254901963, 944 1.0), 945 'dark sea green': ( 0.5607843137254902, 946 0.73725490196078436, 947 0.5607843137254902, 948 1.0), 949 'dark slate blue': ( 0.28235294117647058, 950 0.23921568627450981, 951 0.54509803921568623, 952 1.0), 953 'dark slate gray': ( 0.18431372549019609, 954 0.30980392156862746, 955 0.30980392156862746, 956 1.0), 957 'dark slate grey': ( 0.18431372549019609, 958 0.30980392156862746, 959 0.30980392156862746, 960 1.0), 961 'dark turquoise': (0.0, 0.80784313725490198, 0.81960784313725488, 1.0), 962 'dark violet': (0.58039215686274515, 0.0, 0.82745098039215681, 1.0), 963 'darkblue': (0.0, 0.0, 0.54509803921568623, 1.0), 964 'darkcyan': (0.0, 0.54509803921568623, 0.54509803921568623, 1.0), 965 'darkgoldenrod': ( 0.72156862745098038, 966 0.52549019607843139, 967 0.043137254901960784, 968 1.0), 969 'darkgoldenrod1': (1.0, 0.72549019607843135, 0.058823529411764705, 1.0), 970 'darkgoldenrod2': ( 0.93333333333333335, 971 0.67843137254901964, 972 0.054901960784313725, 973 1.0), 974 'darkgoldenrod3': ( 0.80392156862745101, 975 0.58431372549019611, 976 0.047058823529411764, 977 1.0), 978 'darkgoldenrod4': ( 0.54509803921568623, 979 0.396078431372549, 980 0.031372549019607843, 981 1.0), 982 'darkgray': ( 0.66274509803921566, 983 0.66274509803921566, 984 0.66274509803921566, 985 1.0), 986 'darkgreen': (0.0, 0.39215686274509803, 0.0, 1.0), 987 'darkgrey': ( 0.66274509803921566, 988 0.66274509803921566, 989 0.66274509803921566, 990 1.0), 991 'darkkhaki': ( 0.74117647058823533, 992 0.71764705882352942, 993 0.41960784313725491, 994 1.0), 995 'darkmagenta': (0.54509803921568623, 0.0, 0.54509803921568623, 1.0), 996 'darkolivegreen': ( 0.33333333333333331, 997 0.41960784313725491, 998 0.18431372549019609, 999 1.0), 1000 'darkolivegreen1': (0.792156862745098, 1.0, 0.4392156862745098, 1.0), 1001 'darkolivegreen2': ( 0.73725490196078436, 1002 0.93333333333333335, 1003 0.40784313725490196, 1004 1.0), 1005 'darkolivegreen3': ( 0.63529411764705879, 1006 0.80392156862745101, 1007 0.35294117647058826, 1008 1.0), 1009 'darkolivegreen4': ( 0.43137254901960786, 1010 0.54509803921568623, 1011 0.23921568627450981, 1012 1.0), 1013 'darkorange': (1.0, 0.5490196078431373, 0.0, 1.0), 1014 'darkorange1': (1.0, 0.49803921568627452, 0.0, 1.0), 1015 'darkorange2': (0.93333333333333335, 0.46274509803921571, 0.0, 1.0), 1016 'darkorange3': (0.80392156862745101, 0.40000000000000002, 0.0, 1.0), 1017 'darkorange4': (0.54509803921568623, 0.27058823529411763, 0.0, 1.0), 1018 'darkorchid': ( 0.59999999999999998, 1019 0.19607843137254902, 1020 0.80000000000000004, 1021 1.0), 1022 'darkorchid1': (0.74901960784313726, 0.24313725490196078, 1.0, 1.0), 1023 'darkorchid2': ( 0.69803921568627447, 1024 0.22745098039215686, 1025 0.93333333333333335, 1026 1.0), 1027 'darkorchid3': ( 0.60392156862745094, 1028 0.19607843137254902, 1029 0.80392156862745101, 1030 1.0), 1031 'darkorchid4': ( 0.40784313725490196, 1032 0.13333333333333333, 1033 0.54509803921568623, 1034 1.0), 1035 'darkred': (0.54509803921568623, 0.0, 0.0, 1.0), 1036 'darksalmon': ( 0.9137254901960784, 1037 0.58823529411764708, 1038 0.47843137254901963, 1039 1.0), 1040 'darkseagreen': ( 0.5607843137254902, 1041 0.73725490196078436, 1042 0.5607843137254902, 1043 1.0), 1044 'darkseagreen1': (0.75686274509803919, 1.0, 0.75686274509803919, 1.0), 1045 'darkseagreen2': ( 0.70588235294117652, 1046 0.93333333333333335, 1047 0.70588235294117652, 1048 1.0), 1049 'darkseagreen3': ( 0.60784313725490191, 1050 0.80392156862745101, 1051 0.60784313725490191, 1052 1.0), 1053 'darkseagreen4': ( 0.41176470588235292, 1054 0.54509803921568623, 1055 0.41176470588235292, 1056 1.0), 1057 'darkslateblue': ( 0.28235294117647058, 1058 0.23921568627450981, 1059 0.54509803921568623, 1060 1.0), 1061 'darkslategray': ( 0.18431372549019609, 1062 0.30980392156862746, 1063 0.30980392156862746, 1064 1.0), 1065 'darkslategray1': (0.59215686274509804, 1.0, 1.0, 1.0), 1066 'darkslategray2': ( 0.55294117647058827, 1067 0.93333333333333335, 1068 0.93333333333333335, 1069 1.0), 1070 'darkslategray3': ( 0.47450980392156861, 1071 0.80392156862745101, 1072 0.80392156862745101, 1073 1.0), 1074 'darkslategray4': ( 0.32156862745098042, 1075 0.54509803921568623, 1076 0.54509803921568623, 1077 1.0), 1078 'darkslategrey': ( 0.18431372549019609, 1079 0.30980392156862746, 1080 0.30980392156862746, 1081 1.0), 1082 'darkturquoise': (0.0, 0.80784313725490198, 0.81960784313725488, 1.0), 1083 'darkviolet': (0.58039215686274515, 0.0, 0.82745098039215681, 1.0), 1084 'deep pink': (1.0, 0.078431372549019607, 0.57647058823529407, 1.0), 1085 'deep sky blue': (0.0, 0.74901960784313726, 1.0, 1.0), 1086 'deeppink': (1.0, 0.078431372549019607, 0.57647058823529407, 1.0), 1087 'deeppink1': (1.0, 0.078431372549019607, 0.57647058823529407, 1.0), 1088 'deeppink2': ( 0.93333333333333335, 1089 0.070588235294117646, 1090 0.53725490196078429, 1091 1.0), 1092 'deeppink3': ( 0.80392156862745101, 1093 0.062745098039215685, 1094 0.46274509803921571, 1095 1.0), 1096 'deeppink4': ( 0.54509803921568623, 1097 0.039215686274509803, 1098 0.31372549019607843, 1099 1.0), 1100 'deepskyblue': (0.0, 0.74901960784313726, 1.0, 1.0), 1101 'deepskyblue1': (0.0, 0.74901960784313726, 1.0, 1.0), 1102 'deepskyblue2': (0.0, 0.69803921568627447, 0.93333333333333335, 1.0), 1103 'deepskyblue3': (0.0, 0.60392156862745094, 0.80392156862745101, 1.0), 1104 'deepskyblue4': (0.0, 0.40784313725490196, 0.54509803921568623, 1.0), 1105 'dim gray': ( 0.41176470588235292, 1106 0.41176470588235292, 1107 0.41176470588235292, 1108 1.0), 1109 'dim grey': ( 0.41176470588235292, 1110 0.41176470588235292, 1111 0.41176470588235292, 1112 1.0), 1113 'dimgray': ( 0.41176470588235292, 1114 0.41176470588235292, 1115 0.41176470588235292, 1116 1.0), 1117 'dimgrey': ( 0.41176470588235292, 1118 0.41176470588235292, 1119 0.41176470588235292, 1120 1.0), 1121 'dodger blue': (0.11764705882352941, 0.56470588235294117, 1.0, 1.0), 1122 'dodgerblue': (0.11764705882352941, 0.56470588235294117, 1.0, 1.0), 1123 'dodgerblue1': (0.11764705882352941, 0.56470588235294117, 1.0, 1.0), 1124 'dodgerblue2': ( 0.10980392156862745, 1125 0.52549019607843139, 1126 0.93333333333333335, 1127 1.0), 1128 'dodgerblue3': ( 0.094117647058823528, 1129 0.45490196078431372, 1130 0.80392156862745101, 1131 1.0), 1132 'dodgerblue4': ( 0.062745098039215685, 1133 0.30588235294117649, 1134 0.54509803921568623, 1135 1.0), 1136 'firebrick': ( 0.69803921568627447, 1137 0.13333333333333333, 1138 0.13333333333333333, 1139 1.0), 1140 'firebrick1': (1.0, 0.18823529411764706, 0.18823529411764706, 1.0), 1141 'firebrick2': ( 0.93333333333333335, 1142 0.17254901960784313, 1143 0.17254901960784313, 1144 1.0), 1145 'firebrick3': ( 0.80392156862745101, 1146 0.14901960784313725, 1147 0.14901960784313725, 1148 1.0), 1149 'firebrick4': ( 0.54509803921568623, 1150 0.10196078431372549, 1151 0.10196078431372549, 1152 1.0), 1153 'floral white': (1.0, 0.98039215686274506, 0.94117647058823528, 1.0), 1154 'floralwhite': (1.0, 0.98039215686274506, 0.94117647058823528, 1.0), 1155 'forest green': ( 0.13333333333333333, 1156 0.54509803921568623, 1157 0.13333333333333333, 1158 1.0), 1159 'forestgreen': ( 0.13333333333333333, 1160 0.54509803921568623, 1161 0.13333333333333333, 1162 1.0), 1163 'fuchsia': (1.0, 0.0, 1.0, 1.0), 1164 'gainsboro': ( 0.86274509803921573, 1165 0.86274509803921573, 1166 0.86274509803921573, 1167 1.0), 1168 'ghost white': (0.97254901960784312, 0.97254901960784312, 1.0, 1.0), 1169 'ghostwhite': (0.97254901960784312, 0.97254901960784312, 1.0, 1.0), 1170 'gold': (1.0, 0.84313725490196079, 0.0, 1.0), 1171 'gold1': (1.0, 0.84313725490196079, 0.0, 1.0), 1172 'gold2': (0.93333333333333335, 0.78823529411764703, 0.0, 1.0), 1173 'gold3': (0.80392156862745101, 0.67843137254901964, 0.0, 1.0), 1174 'gold4': (0.54509803921568623, 0.45882352941176469, 0.0, 1.0), 1175 'goldenrod': ( 0.85490196078431369, 1176 0.6470588235294118, 1177 0.12549019607843137, 1178 1.0), 1179 'goldenrod1': (1.0, 0.75686274509803919, 0.14509803921568629, 1.0), 1180 'goldenrod2': ( 0.93333333333333335, 1181 0.70588235294117652, 1182 0.13333333333333333, 1183 1.0), 1184 'goldenrod3': ( 0.80392156862745101, 1185 0.60784313725490191, 1186 0.11372549019607843, 1187 1.0), 1188 'goldenrod4': ( 0.54509803921568623, 1189 0.41176470588235292, 1190 0.078431372549019607, 1191 1.0), 1192 'gray': ( 0.74509803921568629, 1193 0.74509803921568629, 1194 0.74509803921568629, 1195 1.0), 1196 'gray0': (0.0, 0.0, 0.0, 1.0), 1197 'gray1': ( 0.011764705882352941, 1198 0.011764705882352941, 1199 0.011764705882352941, 1200 1.0), 1201 'gray10': ( 0.10196078431372549, 1202 0.10196078431372549, 1203 0.10196078431372549, 1204 1.0), 1205 'gray100': (1.0, 1.0, 1.0, 1.0), 1206 'gray11': ( 0.10980392156862745, 1207 0.10980392156862745, 1208 0.10980392156862745, 1209 1.0), 1210 'gray12': ( 0.12156862745098039, 1211 0.12156862745098039, 1212 0.12156862745098039, 1213 1.0), 1214 'gray13': ( 0.12941176470588237, 1215 0.12941176470588237, 1216 0.12941176470588237, 1217 1.0), 1218 'gray14': ( 0.14117647058823529, 1219 0.14117647058823529, 1220 0.14117647058823529, 1221 1.0), 1222 'gray15': ( 0.14901960784313725, 1223 0.14901960784313725, 1224 0.14901960784313725, 1225 1.0), 1226 'gray16': ( 0.16078431372549021, 1227 0.16078431372549021, 1228 0.16078431372549021, 1229 1.0), 1230 'gray17': ( 0.16862745098039217, 1231 0.16862745098039217, 1232 0.16862745098039217, 1233 1.0), 1234 'gray18': ( 0.1803921568627451, 1235 0.1803921568627451, 1236 0.1803921568627451, 1237 1.0), 1238 'gray19': ( 0.18823529411764706, 1239 0.18823529411764706, 1240 0.18823529411764706, 1241 1.0), 1242 'gray2': ( 0.019607843137254902, 1243 0.019607843137254902, 1244 0.019607843137254902, 1245 1.0), 1246 'gray20': ( 0.20000000000000001, 1247 0.20000000000000001, 1248 0.20000000000000001, 1249 1.0), 1250 'gray21': ( 0.21176470588235294, 1251 0.21176470588235294, 1252 0.21176470588235294, 1253 1.0), 1254 'gray22': ( 0.2196078431372549, 1255 0.2196078431372549, 1256 0.2196078431372549, 1257 1.0), 1258 'gray23': ( 0.23137254901960785, 1259 0.23137254901960785, 1260 0.23137254901960785, 1261 1.0), 1262 'gray24': ( 0.23921568627450981, 1263 0.23921568627450981, 1264 0.23921568627450981, 1265 1.0), 1266 'gray25': ( 0.25098039215686274, 1267 0.25098039215686274, 1268 0.25098039215686274, 1269 1.0), 1270 'gray26': ( 0.25882352941176473, 1271 0.25882352941176473, 1272 0.25882352941176473, 1273 1.0), 1274 'gray27': ( 0.27058823529411763, 1275 0.27058823529411763, 1276 0.27058823529411763, 1277 1.0), 1278 'gray28': ( 0.27843137254901962, 1279 0.27843137254901962, 1280 0.27843137254901962, 1281 1.0), 1282 'gray29': ( 0.29019607843137257, 1283 0.29019607843137257, 1284 0.29019607843137257, 1285 1.0), 1286 'gray3': ( 0.031372549019607843, 1287 0.031372549019607843, 1288 0.031372549019607843, 1289 1.0), 1290 'gray30': ( 0.30196078431372547, 1291 0.30196078431372547, 1292 0.30196078431372547, 1293 1.0), 1294 'gray31': ( 0.30980392156862746, 1295 0.30980392156862746, 1296 0.30980392156862746, 1297 1.0), 1298 'gray32': ( 0.32156862745098042, 1299 0.32156862745098042, 1300 0.32156862745098042, 1301 1.0), 1302 'gray33': ( 0.32941176470588235, 1303 0.32941176470588235, 1304 0.32941176470588235, 1305 1.0), 1306 'gray34': ( 0.3411764705882353, 1307 0.3411764705882353, 1308 0.3411764705882353, 1309 1.0), 1310 'gray35': ( 0.34901960784313724, 1311 0.34901960784313724, 1312 0.34901960784313724, 1313 1.0), 1314 'gray36': ( 0.36078431372549019, 1315 0.36078431372549019, 1316 0.36078431372549019, 1317 1.0), 1318 'gray37': ( 0.36862745098039218, 1319 0.36862745098039218, 1320 0.36862745098039218, 1321 1.0), 1322 'gray38': ( 0.38039215686274508, 1323 0.38039215686274508, 1324 0.38039215686274508, 1325 1.0), 1326 'gray39': ( 0.38823529411764707, 1327 0.38823529411764707, 1328 0.38823529411764707, 1329 1.0), 1330 'gray4': ( 0.039215686274509803, 1331 0.039215686274509803, 1332 0.039215686274509803, 1333 1.0), 1334 'gray40': ( 0.40000000000000002, 1335 0.40000000000000002, 1336 0.40000000000000002, 1337 1.0), 1338 'gray41': ( 0.41176470588235292, 1339 0.41176470588235292, 1340 0.41176470588235292, 1341 1.0), 1342 'gray42': ( 0.41960784313725491, 1343 0.41960784313725491, 1344 0.41960784313725491, 1345 1.0), 1346 'gray43': ( 0.43137254901960786, 1347 0.43137254901960786, 1348 0.43137254901960786, 1349 1.0), 1350 'gray44': ( 0.4392156862745098, 1351 0.4392156862745098, 1352 0.4392156862745098, 1353 1.0), 1354 'gray45': ( 0.45098039215686275, 1355 0.45098039215686275, 1356 0.45098039215686275, 1357 1.0), 1358 'gray46': ( 0.45882352941176469, 1359 0.45882352941176469, 1360 0.45882352941176469, 1361 1.0), 1362 'gray47': ( 0.47058823529411764, 1363 0.47058823529411764, 1364 0.47058823529411764, 1365 1.0), 1366 'gray48': ( 0.47843137254901963, 1367 0.47843137254901963, 1368 0.47843137254901963, 1369 1.0), 1370 'gray49': ( 0.49019607843137253, 1371 0.49019607843137253, 1372 0.49019607843137253, 1373 1.0), 1374 'gray5': ( 0.050980392156862744, 1375 0.050980392156862744, 1376 0.050980392156862744, 1377 1.0), 1378 'gray50': ( 0.49803921568627452, 1379 0.49803921568627452, 1380 0.49803921568627452, 1381 1.0), 1382 'gray51': ( 0.50980392156862742, 1383 0.50980392156862742, 1384 0.50980392156862742, 1385 1.0), 1386 'gray52': ( 0.52156862745098043, 1387 0.52156862745098043, 1388 0.52156862745098043, 1389 1.0), 1390 'gray53': ( 0.52941176470588236, 1391 0.52941176470588236, 1392 0.52941176470588236, 1393 1.0), 1394 'gray54': ( 0.54117647058823526, 1395 0.54117647058823526, 1396 0.54117647058823526, 1397 1.0), 1398 'gray55': ( 0.5490196078431373, 1399 0.5490196078431373, 1400 0.5490196078431373, 1401 1.0), 1402 'gray56': ( 0.5607843137254902, 1403 0.5607843137254902, 1404 0.5607843137254902, 1405 1.0), 1406 'gray57': ( 0.56862745098039214, 1407 0.56862745098039214, 1408 0.56862745098039214, 1409 1.0), 1410 'gray58': ( 0.58039215686274515, 1411 0.58039215686274515, 1412 0.58039215686274515, 1413 1.0), 1414 'gray59': ( 0.58823529411764708, 1415 0.58823529411764708, 1416 0.58823529411764708, 1417 1.0), 1418 'gray6': ( 0.058823529411764705, 1419 0.058823529411764705, 1420 0.058823529411764705, 1421 1.0), 1422 'gray60': ( 0.59999999999999998, 1423 0.59999999999999998, 1424 0.59999999999999998, 1425 1.0), 1426 'gray61': ( 0.61176470588235299, 1427 0.61176470588235299, 1428 0.61176470588235299, 1429 1.0), 1430 'gray62': ( 0.61960784313725492, 1431 0.61960784313725492, 1432 0.61960784313725492, 1433 1.0), 1434 'gray63': ( 0.63137254901960782, 1435 0.63137254901960782, 1436 0.63137254901960782, 1437 1.0), 1438 'gray64': ( 0.63921568627450975, 1439 0.63921568627450975, 1440 0.63921568627450975, 1441 1.0), 1442 'gray65': ( 0.65098039215686276, 1443 0.65098039215686276, 1444 0.65098039215686276, 1445 1.0), 1446 'gray66': ( 0.6588235294117647, 1447 0.6588235294117647, 1448 0.6588235294117647, 1449 1.0), 1450 'gray67': ( 0.6705882352941176, 1451 0.6705882352941176, 1452 0.6705882352941176, 1453 1.0), 1454 'gray68': ( 0.67843137254901964, 1455 0.67843137254901964, 1456 0.67843137254901964, 1457 1.0), 1458 'gray69': ( 0.69019607843137254, 1459 0.69019607843137254, 1460 0.69019607843137254, 1461 1.0), 1462 'gray7': ( 0.070588235294117646, 1463 0.070588235294117646, 1464 0.070588235294117646, 1465 1.0), 1466 'gray70': ( 0.70196078431372544, 1467 0.70196078431372544, 1468 0.70196078431372544, 1469 1.0), 1470 'gray71': ( 0.70980392156862748, 1471 0.70980392156862748, 1472 0.70980392156862748, 1473 1.0), 1474 'gray72': ( 0.72156862745098038, 1475 0.72156862745098038, 1476 0.72156862745098038, 1477 1.0), 1478 'gray73': ( 0.72941176470588232, 1479 0.72941176470588232, 1480 0.72941176470588232, 1481 1.0), 1482 'gray74': ( 0.74117647058823533, 1483 0.74117647058823533, 1484 0.74117647058823533, 1485 1.0), 1486 'gray75': ( 0.74901960784313726, 1487 0.74901960784313726, 1488 0.74901960784313726, 1489 1.0), 1490 'gray76': ( 0.76078431372549016, 1491 0.76078431372549016, 1492 0.76078431372549016, 1493 1.0), 1494 'gray77': ( 0.7686274509803922, 1495 0.7686274509803922, 1496 0.7686274509803922, 1497 1.0), 1498 'gray78': ( 0.7803921568627451, 1499 0.7803921568627451, 1500 0.7803921568627451, 1501 1.0), 1502 'gray79': ( 0.78823529411764703, 1503 0.78823529411764703, 1504 0.78823529411764703, 1505 1.0), 1506 'gray8': ( 0.078431372549019607, 1507 0.078431372549019607, 1508 0.078431372549019607, 1509 1.0), 1510 'gray80': ( 0.80000000000000004, 1511 0.80000000000000004, 1512 0.80000000000000004, 1513 1.0), 1514 'gray81': ( 0.81176470588235294, 1515 0.81176470588235294, 1516 0.81176470588235294, 1517 1.0), 1518 'gray82': ( 0.81960784313725488, 1519 0.81960784313725488, 1520 0.81960784313725488, 1521 1.0), 1522 'gray83': ( 0.83137254901960789, 1523 0.83137254901960789, 1524 0.83137254901960789, 1525 1.0), 1526 'gray84': ( 0.83921568627450982, 1527 0.83921568627450982, 1528 0.83921568627450982, 1529 1.0), 1530 'gray85': ( 0.85098039215686272, 1531 0.85098039215686272, 1532 0.85098039215686272, 1533 1.0), 1534 'gray86': ( 0.85882352941176465, 1535 0.85882352941176465, 1536 0.85882352941176465, 1537 1.0), 1538 'gray87': ( 0.87058823529411766, 1539 0.87058823529411766, 1540 0.87058823529411766, 1541 1.0), 1542 'gray88': ( 0.8784313725490196, 1543 0.8784313725490196, 1544 0.8784313725490196, 1545 1.0), 1546 'gray89': ( 0.8901960784313725, 1547 0.8901960784313725, 1548 0.8901960784313725, 1549 1.0), 1550 'gray9': ( 0.090196078431372548, 1551 0.090196078431372548, 1552 0.090196078431372548, 1553 1.0), 1554 'gray90': ( 0.89803921568627454, 1555 0.89803921568627454, 1556 0.89803921568627454, 1557 1.0), 1558 'gray91': ( 0.90980392156862744, 1559 0.90980392156862744, 1560 0.90980392156862744, 1561 1.0), 1562 'gray92': ( 0.92156862745098034, 1563 0.92156862745098034, 1564 0.92156862745098034, 1565 1.0), 1566 'gray93': ( 0.92941176470588238, 1567 0.92941176470588238, 1568 0.92941176470588238, 1569 1.0), 1570 'gray94': ( 0.94117647058823528, 1571 0.94117647058823528, 1572 0.94117647058823528, 1573 1.0), 1574 'gray95': ( 0.94901960784313721, 1575 0.94901960784313721, 1576 0.94901960784313721, 1577 1.0), 1578 'gray96': ( 0.96078431372549022, 1579 0.96078431372549022, 1580 0.96078431372549022, 1581 1.0), 1582 'gray97': ( 0.96862745098039216, 1583 0.96862745098039216, 1584 0.96862745098039216, 1585 1.0), 1586 'gray98': ( 0.98039215686274506, 1587 0.98039215686274506, 1588 0.98039215686274506, 1589 1.0), 1590 'gray99': ( 0.9882352941176471, 1591 0.9882352941176471, 1592 0.9882352941176471, 1593 1.0), 1594 'green': (0.0, 1.0, 0.0, 1.0), 1595 'green yellow': (0.67843137254901964, 1.0, 0.18431372549019609, 1.0), 1596 'green1': (0.0, 1.0, 0.0, 1.0), 1597 'green2': (0.0, 0.93333333333333335, 0.0, 1.0), 1598 'green3': (0.0, 0.80392156862745101, 0.0, 1.0), 1599 'green4': (0.0, 0.54509803921568623, 0.0, 1.0), 1600 'greenyellow': (0.67843137254901964, 1.0, 0.18431372549019609, 1.0), 1601 'grey': ( 0.74509803921568629, 1602 0.74509803921568629, 1603 0.74509803921568629, 1604 1.0), 1605 'grey0': (0.0, 0.0, 0.0, 1.0), 1606 'grey1': ( 0.011764705882352941, 1607 0.011764705882352941, 1608 0.011764705882352941, 1609 1.0), 1610 'grey10': ( 0.10196078431372549, 1611 0.10196078431372549, 1612 0.10196078431372549, 1613 1.0), 1614 'grey100': (1.0, 1.0, 1.0, 1.0), 1615 'grey11': ( 0.10980392156862745, 1616 0.10980392156862745, 1617 0.10980392156862745, 1618 1.0), 1619 'grey12': ( 0.12156862745098039, 1620 0.12156862745098039, 1621 0.12156862745098039, 1622 1.0), 1623 'grey13': ( 0.12941176470588237, 1624 0.12941176470588237, 1625 0.12941176470588237, 1626 1.0), 1627 'grey14': ( 0.14117647058823529, 1628 0.14117647058823529, 1629 0.14117647058823529, 1630 1.0), 1631 'grey15': ( 0.14901960784313725, 1632 0.14901960784313725, 1633 0.14901960784313725, 1634 1.0), 1635 'grey16': ( 0.16078431372549021, 1636 0.16078431372549021, 1637 0.16078431372549021, 1638 1.0), 1639 'grey17': ( 0.16862745098039217, 1640 0.16862745098039217, 1641 0.16862745098039217, 1642 1.0), 1643 'grey18': ( 0.1803921568627451, 1644 0.1803921568627451, 1645 0.1803921568627451, 1646 1.0), 1647 'grey19': ( 0.18823529411764706, 1648 0.18823529411764706, 1649 0.18823529411764706, 1650 1.0), 1651 'grey2': ( 0.019607843137254902, 1652 0.019607843137254902, 1653 0.019607843137254902, 1654 1.0), 1655 'grey20': ( 0.20000000000000001, 1656 0.20000000000000001, 1657 0.20000000000000001, 1658 1.0), 1659 'grey21': ( 0.21176470588235294, 1660 0.21176470588235294, 1661 0.21176470588235294, 1662 1.0), 1663 'grey22': ( 0.2196078431372549, 1664 0.2196078431372549, 1665 0.2196078431372549, 1666 1.0), 1667 'grey23': ( 0.23137254901960785, 1668 0.23137254901960785, 1669 0.23137254901960785, 1670 1.0), 1671 'grey24': ( 0.23921568627450981, 1672 0.23921568627450981, 1673 0.23921568627450981, 1674 1.0), 1675 'grey25': ( 0.25098039215686274, 1676 0.25098039215686274, 1677 0.25098039215686274, 1678 1.0), 1679 'grey26': ( 0.25882352941176473, 1680 0.25882352941176473, 1681 0.25882352941176473, 1682 1.0), 1683 'grey27': ( 0.27058823529411763, 1684 0.27058823529411763, 1685 0.27058823529411763, 1686 1.0), 1687 'grey28': ( 0.27843137254901962, 1688 0.27843137254901962, 1689 0.27843137254901962, 1690 1.0), 1691 'grey29': ( 0.29019607843137257, 1692 0.29019607843137257, 1693 0.29019607843137257, 1694 1.0), 1695 'grey3': ( 0.031372549019607843, 1696 0.031372549019607843, 1697 0.031372549019607843, 1698 1.0), 1699 'grey30': ( 0.30196078431372547, 1700 0.30196078431372547, 1701 0.30196078431372547, 1702 1.0), 1703 'grey31': ( 0.30980392156862746, 1704 0.30980392156862746, 1705 0.30980392156862746, 1706 1.0), 1707 'grey32': ( 0.32156862745098042, 1708 0.32156862745098042, 1709 0.32156862745098042, 1710 1.0), 1711 'grey33': ( 0.32941176470588235, 1712 0.32941176470588235, 1713 0.32941176470588235, 1714 1.0), 1715 'grey34': ( 0.3411764705882353, 1716 0.3411764705882353, 1717 0.3411764705882353, 1718 1.0), 1719 'grey35': ( 0.34901960784313724, 1720 0.34901960784313724, 1721 0.34901960784313724, 1722 1.0), 1723 'grey36': ( 0.36078431372549019, 1724 0.36078431372549019, 1725 0.36078431372549019, 1726 1.0), 1727 'grey37': ( 0.36862745098039218, 1728 0.36862745098039218, 1729 0.36862745098039218, 1730 1.0), 1731 'grey38': ( 0.38039215686274508, 1732 0.38039215686274508, 1733 0.38039215686274508, 1734 1.0), 1735 'grey39': ( 0.38823529411764707, 1736 0.38823529411764707, 1737 0.38823529411764707, 1738 1.0), 1739 'grey4': ( 0.039215686274509803, 1740 0.039215686274509803, 1741 0.039215686274509803, 1742 1.0), 1743 'grey40': ( 0.40000000000000002, 1744 0.40000000000000002, 1745 0.40000000000000002, 1746 1.0), 1747 'grey41': ( 0.41176470588235292, 1748 0.41176470588235292, 1749 0.41176470588235292, 1750 1.0), 1751 'grey42': ( 0.41960784313725491, 1752 0.41960784313725491, 1753 0.41960784313725491, 1754 1.0), 1755 'grey43': ( 0.43137254901960786, 1756 0.43137254901960786, 1757 0.43137254901960786, 1758 1.0), 1759 'grey44': ( 0.4392156862745098, 1760 0.4392156862745098, 1761 0.4392156862745098, 1762 1.0), 1763 'grey45': ( 0.45098039215686275, 1764 0.45098039215686275, 1765 0.45098039215686275, 1766 1.0), 1767 'grey46': ( 0.45882352941176469, 1768 0.45882352941176469, 1769 0.45882352941176469, 1770 1.0), 1771 'grey47': ( 0.47058823529411764, 1772 0.47058823529411764, 1773 0.47058823529411764, 1774 1.0), 1775 'grey48': ( 0.47843137254901963, 1776 0.47843137254901963, 1777 0.47843137254901963, 1778 1.0), 1779 'grey49': ( 0.49019607843137253, 1780 0.49019607843137253, 1781 0.49019607843137253, 1782 1.0), 1783 'grey5': ( 0.050980392156862744, 1784 0.050980392156862744, 1785 0.050980392156862744, 1786 1.0), 1787 'grey50': ( 0.49803921568627452, 1788 0.49803921568627452, 1789 0.49803921568627452, 1790 1.0), 1791 'grey51': ( 0.50980392156862742, 1792 0.50980392156862742, 1793 0.50980392156862742, 1794 1.0), 1795 'grey52': ( 0.52156862745098043, 1796 0.52156862745098043, 1797 0.52156862745098043, 1798 1.0), 1799 'grey53': ( 0.52941176470588236, 1800 0.52941176470588236, 1801 0.52941176470588236, 1802 1.0), 1803 'grey54': ( 0.54117647058823526, 1804 0.54117647058823526, 1805 0.54117647058823526, 1806 1.0), 1807 'grey55': ( 0.5490196078431373, 1808 0.5490196078431373, 1809 0.5490196078431373, 1810 1.0), 1811 'grey56': ( 0.5607843137254902, 1812 0.5607843137254902, 1813 0.5607843137254902, 1814 1.0), 1815 'grey57': ( 0.56862745098039214, 1816 0.56862745098039214, 1817 0.56862745098039214, 1818 1.0), 1819 'grey58': ( 0.58039215686274515, 1820 0.58039215686274515, 1821 0.58039215686274515, 1822 1.0), 1823 'grey59': ( 0.58823529411764708, 1824 0.58823529411764708, 1825 0.58823529411764708, 1826 1.0), 1827 'grey6': ( 0.058823529411764705, 1828 0.058823529411764705, 1829 0.058823529411764705, 1830 1.0), 1831 'grey60': ( 0.59999999999999998, 1832 0.59999999999999998, 1833 0.59999999999999998, 1834 1.0), 1835 'grey61': ( 0.61176470588235299, 1836 0.61176470588235299, 1837 0.61176470588235299, 1838 1.0), 1839 'grey62': ( 0.61960784313725492, 1840 0.61960784313725492, 1841 0.61960784313725492, 1842 1.0), 1843 'grey63': ( 0.63137254901960782, 1844 0.63137254901960782, 1845 0.63137254901960782, 1846 1.0), 1847 'grey64': ( 0.63921568627450975, 1848 0.63921568627450975, 1849 0.63921568627450975, 1850 1.0), 1851 'grey65': ( 0.65098039215686276, 1852 0.65098039215686276, 1853 0.65098039215686276, 1854 1.0), 1855 'grey66': ( 0.6588235294117647, 1856 0.6588235294117647, 1857 0.6588235294117647, 1858 1.0), 1859 'grey67': ( 0.6705882352941176, 1860 0.6705882352941176, 1861 0.6705882352941176, 1862 1.0), 1863 'grey68': ( 0.67843137254901964, 1864 0.67843137254901964, 1865 0.67843137254901964, 1866 1.0), 1867 'grey69': ( 0.69019607843137254, 1868 0.69019607843137254, 1869 0.69019607843137254, 1870 1.0), 1871 'grey7': ( 0.070588235294117646, 1872 0.070588235294117646, 1873 0.070588235294117646, 1874 1.0), 1875 'grey70': ( 0.70196078431372544, 1876 0.70196078431372544, 1877 0.70196078431372544, 1878 1.0), 1879 'grey71': ( 0.70980392156862748, 1880 0.70980392156862748, 1881 0.70980392156862748, 1882 1.0), 1883 'grey72': ( 0.72156862745098038, 1884 0.72156862745098038, 1885 0.72156862745098038, 1886 1.0), 1887 'grey73': ( 0.72941176470588232, 1888 0.72941176470588232, 1889 0.72941176470588232, 1890 1.0), 1891 'grey74': ( 0.74117647058823533, 1892 0.74117647058823533, 1893 0.74117647058823533, 1894 1.0), 1895 'grey75': ( 0.74901960784313726, 1896 0.74901960784313726, 1897 0.74901960784313726, 1898 1.0), 1899 'grey76': ( 0.76078431372549016, 1900 0.76078431372549016, 1901 0.76078431372549016, 1902 1.0), 1903 'grey77': ( 0.7686274509803922, 1904 0.7686274509803922, 1905 0.7686274509803922, 1906 1.0), 1907 'grey78': ( 0.7803921568627451, 1908 0.7803921568627451, 1909 0.7803921568627451, 1910 1.0), 1911 'grey79': ( 0.78823529411764703, 1912 0.78823529411764703, 1913 0.78823529411764703, 1914 1.0), 1915 'grey8': ( 0.078431372549019607, 1916 0.078431372549019607, 1917 0.078431372549019607, 1918 1.0), 1919 'grey80': ( 0.80000000000000004, 1920 0.80000000000000004, 1921 0.80000000000000004, 1922 1.0), 1923 'grey81': ( 0.81176470588235294, 1924 0.81176470588235294, 1925 0.81176470588235294, 1926 1.0), 1927 'grey82': ( 0.81960784313725488, 1928 0.81960784313725488, 1929 0.81960784313725488, 1930 1.0), 1931 'grey83': ( 0.83137254901960789, 1932 0.83137254901960789, 1933 0.83137254901960789, 1934 1.0), 1935 'grey84': ( 0.83921568627450982, 1936 0.83921568627450982, 1937 0.83921568627450982, 1938 1.0), 1939 'grey85': ( 0.85098039215686272, 1940 0.85098039215686272, 1941 0.85098039215686272, 1942 1.0), 1943 'grey86': ( 0.85882352941176465, 1944 0.85882352941176465, 1945 0.85882352941176465, 1946 1.0), 1947 'grey87': ( 0.87058823529411766, 1948 0.87058823529411766, 1949 0.87058823529411766, 1950 1.0), 1951 'grey88': ( 0.8784313725490196, 1952 0.8784313725490196, 1953 0.8784313725490196, 1954 1.0), 1955 'grey89': ( 0.8901960784313725, 1956 0.8901960784313725, 1957 0.8901960784313725, 1958 1.0), 1959 'grey9': ( 0.090196078431372548, 1960 0.090196078431372548, 1961 0.090196078431372548, 1962 1.0), 1963 'grey90': ( 0.89803921568627454, 1964 0.89803921568627454, 1965 0.89803921568627454, 1966 1.0), 1967 'grey91': ( 0.90980392156862744, 1968 0.90980392156862744, 1969 0.90980392156862744, 1970 1.0), 1971 'grey92': ( 0.92156862745098034, 1972 0.92156862745098034, 1973 0.92156862745098034, 1974 1.0), 1975 'grey93': ( 0.92941176470588238, 1976 0.92941176470588238, 1977 0.92941176470588238, 1978 1.0), 1979 'grey94': ( 0.94117647058823528, 1980 0.94117647058823528, 1981 0.94117647058823528, 1982 1.0), 1983 'grey95': ( 0.94901960784313721, 1984 0.94901960784313721, 1985 0.94901960784313721, 1986 1.0), 1987 'grey96': ( 0.96078431372549022, 1988 0.96078431372549022, 1989 0.96078431372549022, 1990 1.0), 1991 'grey97': ( 0.96862745098039216, 1992 0.96862745098039216, 1993 0.96862745098039216, 1994 1.0), 1995 'grey98': ( 0.98039215686274506, 1996 0.98039215686274506, 1997 0.98039215686274506, 1998 1.0), 1999 'grey99': ( 0.9882352941176471, 2000 0.9882352941176471, 2001 0.9882352941176471, 2002 1.0), 2003 'honeydew': (0.94117647058823528, 1.0, 0.94117647058823528, 1.0), 2004 'honeydew1': (0.94117647058823528, 1.0, 0.94117647058823528, 1.0), 2005 'honeydew2': ( 0.8784313725490196, 2006 0.93333333333333335, 2007 0.8784313725490196, 2008 1.0), 2009 'honeydew3': ( 0.75686274509803919, 2010 0.80392156862745101, 2011 0.75686274509803919, 2012 1.0), 2013 'honeydew4': ( 0.51372549019607838, 2014 0.54509803921568623, 2015 0.51372549019607838, 2016 1.0), 2017 'hot pink': (1.0, 0.41176470588235292, 0.70588235294117652, 1.0), 2018 'hotpink': (1.0, 0.41176470588235292, 0.70588235294117652, 1.0), 2019 'hotpink1': (1.0, 0.43137254901960786, 0.70588235294117652, 1.0), 2020 'hotpink2': ( 0.93333333333333335, 2021 0.41568627450980394, 2022 0.65490196078431373, 2023 1.0), 2024 'hotpink3': ( 0.80392156862745101, 2025 0.37647058823529411, 2026 0.56470588235294117, 2027 1.0), 2028 'hotpink4': ( 0.54509803921568623, 2029 0.22745098039215686, 2030 0.3843137254901961, 2031 1.0), 2032 'indian red': ( 0.80392156862745101, 2033 0.36078431372549019, 2034 0.36078431372549019, 2035 1.0), 2036 'indianred': ( 0.80392156862745101, 2037 0.36078431372549019, 2038 0.36078431372549019, 2039 1.0), 2040 'indianred1': (1.0, 0.41568627450980394, 0.41568627450980394, 1.0), 2041 'indianred2': ( 0.93333333333333335, 2042 0.38823529411764707, 2043 0.38823529411764707, 2044 1.0), 2045 'indianred3': ( 0.80392156862745101, 2046 0.33333333333333331, 2047 0.33333333333333331, 2048 1.0), 2049 'indianred4': ( 0.54509803921568623, 2050 0.22745098039215686, 2051 0.22745098039215686, 2052 1.0), 2053 'ivory': (1.0, 1.0, 0.94117647058823528, 1.0), 2054 'ivory1': (1.0, 1.0, 0.94117647058823528, 1.0), 2055 'ivory2': ( 0.93333333333333335, 2056 0.93333333333333335, 2057 0.8784313725490196, 2058 1.0), 2059 'ivory3': ( 0.80392156862745101, 2060 0.80392156862745101, 2061 0.75686274509803919, 2062 1.0), 2063 'ivory4': ( 0.54509803921568623, 2064 0.54509803921568623, 2065 0.51372549019607838, 2066 1.0), 2067 'khaki': ( 0.94117647058823528, 2068 0.90196078431372551, 2069 0.5490196078431373, 2070 1.0), 2071 'khaki1': (1.0, 0.96470588235294119, 0.5607843137254902, 1.0), 2072 'khaki2': ( 0.93333333333333335, 2073 0.90196078431372551, 2074 0.52156862745098043, 2075 1.0), 2076 'khaki3': ( 0.80392156862745101, 2077 0.77647058823529413, 2078 0.45098039215686275, 2079 1.0), 2080 'khaki4': ( 0.54509803921568623, 2081 0.52549019607843139, 2082 0.30588235294117649, 2083 1.0), 2084 'lavender': ( 0.90196078431372551, 2085 0.90196078431372551, 2086 0.98039215686274506, 2087 1.0), 2088 'lavender blush': (1.0, 0.94117647058823528, 0.96078431372549022, 1.0), 2089 'lavenderblush': (1.0, 0.94117647058823528, 0.96078431372549022, 1.0), 2090 'lavenderblush1': (1.0, 0.94117647058823528, 0.96078431372549022, 1.0), 2091 'lavenderblush2': ( 0.93333333333333335, 2092 0.8784313725490196, 2093 0.89803921568627454, 2094 1.0), 2095 'lavenderblush3': ( 0.80392156862745101, 2096 0.75686274509803919, 2097 0.77254901960784317, 2098 1.0), 2099 'lavenderblush4': ( 0.54509803921568623, 2100 0.51372549019607838, 2101 0.52549019607843139, 2102 1.0), 2103 'lawn green': (0.48627450980392156, 0.9882352941176471, 0.0, 1.0), 2104 'lawngreen': (0.48627450980392156, 0.9882352941176471, 0.0, 1.0), 2105 'lemon chiffon': (1.0, 0.98039215686274506, 0.80392156862745101, 1.0), 2106 'lemonchiffon': (1.0, 0.98039215686274506, 0.80392156862745101, 1.0), 2107 'lemonchiffon1': (1.0, 0.98039215686274506, 0.80392156862745101, 1.0), 2108 'lemonchiffon2': ( 0.93333333333333335, 2109 0.9137254901960784, 2110 0.74901960784313726, 2111 1.0), 2112 'lemonchiffon3': ( 0.80392156862745101, 2113 0.78823529411764703, 2114 0.6470588235294118, 2115 1.0), 2116 'lemonchiffon4': ( 0.54509803921568623, 2117 0.53725490196078429, 2118 0.4392156862745098, 2119 1.0), 2120 'light blue': ( 0.67843137254901964, 2121 0.84705882352941175, 2122 0.90196078431372551, 2123 1.0), 2124 'light coral': ( 0.94117647058823528, 2125 0.50196078431372548, 2126 0.50196078431372548, 2127 1.0), 2128 'light cyan': (0.8784313725490196, 1.0, 1.0, 1.0), 2129 'light goldenrod': ( 0.93333333333333335, 2130 0.8666666666666667, 2131 0.50980392156862742, 2132 1.0), 2133 'light goldenrod yellow': ( 0.98039215686274506, 2134 0.98039215686274506, 2135 0.82352941176470584, 2136 1.0), 2137 'light gray': ( 0.82745098039215681, 2138 0.82745098039215681, 2139 0.82745098039215681, 2140 1.0), 2141 'light green': ( 0.56470588235294117, 2142 0.93333333333333335, 2143 0.56470588235294117, 2144 1.0), 2145 'light grey': ( 0.82745098039215681, 2146 0.82745098039215681, 2147 0.82745098039215681, 2148 1.0), 2149 'light pink': (1.0, 0.71372549019607845, 0.75686274509803919, 1.0), 2150 'light salmon': (1.0, 0.62745098039215685, 0.47843137254901963, 1.0), 2151 'light sea green': ( 0.12549019607843137, 2152 0.69803921568627447, 2153 0.66666666666666663, 2154 1.0), 2155 'light sky blue': ( 0.52941176470588236, 2156 0.80784313725490198, 2157 0.98039215686274506, 2158 1.0), 2159 'light slate blue': (0.51764705882352946, 0.4392156862745098, 1.0, 1.0), 2160 'light slate gray': ( 0.46666666666666667, 2161 0.53333333333333333, 2162 0.59999999999999998, 2163 1.0), 2164 'light slate grey': ( 0.46666666666666667, 2165 0.53333333333333333, 2166 0.59999999999999998, 2167 1.0), 2168 'light steel blue': ( 0.69019607843137254, 2169 0.7686274509803922, 2170 0.87058823529411766, 2171 1.0), 2172 'light yellow': (1.0, 1.0, 0.8784313725490196, 1.0), 2173 'lightblue': ( 0.67843137254901964, 2174 0.84705882352941175, 2175 0.90196078431372551, 2176 1.0), 2177 'lightblue1': (0.74901960784313726, 0.93725490196078431, 1.0, 1.0), 2178 'lightblue2': ( 0.69803921568627447, 2179 0.87450980392156863, 2180 0.93333333333333335, 2181 1.0), 2182 'lightblue3': ( 0.60392156862745094, 2183 0.75294117647058822, 2184 0.80392156862745101, 2185 1.0), 2186 'lightblue4': ( 0.40784313725490196, 2187 0.51372549019607838, 2188 0.54509803921568623, 2189 1.0), 2190 'lightcoral': ( 0.94117647058823528, 2191 0.50196078431372548, 2192 0.50196078431372548, 2193 1.0), 2194 'lightcyan': (0.8784313725490196, 1.0, 1.0, 1.0), 2195 'lightcyan1': (0.8784313725490196, 1.0, 1.0, 1.0), 2196 'lightcyan2': ( 0.81960784313725488, 2197 0.93333333333333335, 2198 0.93333333333333335, 2199 1.0), 2200 'lightcyan3': ( 0.70588235294117652, 2201 0.80392156862745101, 2202 0.80392156862745101, 2203 1.0), 2204 'lightcyan4': ( 0.47843137254901963, 2205 0.54509803921568623, 2206 0.54509803921568623, 2207 1.0), 2208 'lightgoldenrod': ( 0.93333333333333335, 2209 0.8666666666666667, 2210 0.50980392156862742, 2211 1.0), 2212 'lightgoldenrod1': (1.0, 0.92549019607843142, 0.54509803921568623, 1.0), 2213 'lightgoldenrod2': ( 0.93333333333333335, 2214 0.86274509803921573, 2215 0.50980392156862742, 2216 1.0), 2217 'lightgoldenrod3': ( 0.80392156862745101, 2218 0.74509803921568629, 2219 0.4392156862745098, 2220 1.0), 2221 'lightgoldenrod4': ( 0.54509803921568623, 2222 0.50588235294117645, 2223 0.29803921568627451, 2224 1.0), 2225 'lightgoldenrodyellow': ( 0.98039215686274506, 2226 0.98039215686274506, 2227 0.82352941176470584, 2228 1.0), 2229 'lightgray': ( 0.82745098039215681, 2230 0.82745098039215681, 2231 0.82745098039215681, 2232 1.0), 2233 'lightgreen': ( 0.56470588235294117, 2234 0.93333333333333335, 2235 0.56470588235294117, 2236 1.0), 2237 'lightgrey': ( 0.82745098039215681, 2238 0.82745098039215681, 2239 0.82745098039215681, 2240 1.0), 2241 'lightpink': (1.0, 0.71372549019607845, 0.75686274509803919, 1.0), 2242 'lightpink1': (1.0, 0.68235294117647061, 0.72549019607843135, 1.0), 2243 'lightpink2': ( 0.93333333333333335, 2244 0.63529411764705879, 2245 0.67843137254901964, 2246 1.0), 2247 'lightpink3': ( 0.80392156862745101, 2248 0.5490196078431373, 2249 0.58431372549019611, 2250 1.0), 2251 'lightpink4': ( 0.54509803921568623, 2252 0.37254901960784315, 2253 0.396078431372549, 2254 1.0), 2255 'lightsalmon': (1.0, 0.62745098039215685, 0.47843137254901963, 1.0), 2256 'lightsalmon1': (1.0, 0.62745098039215685, 0.47843137254901963, 1.0), 2257 'lightsalmon2': ( 0.93333333333333335, 2258 0.58431372549019611, 2259 0.44705882352941179, 2260 1.0), 2261 'lightsalmon3': ( 0.80392156862745101, 2262 0.50588235294117645, 2263 0.3843137254901961, 2264 1.0), 2265 'lightsalmon4': ( 0.54509803921568623, 2266 0.3411764705882353, 2267 0.25882352941176473, 2268 1.0), 2269 'lightseagreen': ( 0.12549019607843137, 2270 0.69803921568627447, 2271 0.66666666666666663, 2272 1.0), 2273 'lightskyblue': ( 0.52941176470588236, 2274 0.80784313725490198, 2275 0.98039215686274506, 2276 1.0), 2277 'lightskyblue1': (0.69019607843137254, 0.88627450980392153, 1.0, 1.0), 2278 'lightskyblue2': ( 0.64313725490196083, 2279 0.82745098039215681, 2280 0.93333333333333335, 2281 1.0), 2282 'lightskyblue3': ( 0.55294117647058827, 2283 0.71372549019607845, 2284 0.80392156862745101, 2285 1.0), 2286 'lightskyblue4': ( 0.37647058823529411, 2287 0.4823529411764706, 2288 0.54509803921568623, 2289 1.0), 2290 'lightslateblue': (0.51764705882352946, 0.4392156862745098, 1.0, 1.0), 2291 'lightslategray': ( 0.46666666666666667, 2292 0.53333333333333333, 2293 0.59999999999999998, 2294 1.0), 2295 'lightslategrey': ( 0.46666666666666667, 2296 0.53333333333333333, 2297 0.59999999999999998, 2298 1.0), 2299 'lightsteelblue': ( 0.69019607843137254, 2300 0.7686274509803922, 2301 0.87058823529411766, 2302 1.0), 2303 'lightsteelblue1': (0.792156862745098, 0.88235294117647056, 1.0, 1.0), 2304 'lightsteelblue2': ( 0.73725490196078436, 2305 0.82352941176470584, 2306 0.93333333333333335, 2307 1.0), 2308 'lightsteelblue3': ( 0.63529411764705879, 2309 0.70980392156862748, 2310 0.80392156862745101, 2311 1.0), 2312 'lightsteelblue4': ( 0.43137254901960786, 2313 0.4823529411764706, 2314 0.54509803921568623, 2315 1.0), 2316 'lightyellow': (1.0, 1.0, 0.8784313725490196, 1.0), 2317 'lightyellow1': (1.0, 1.0, 0.8784313725490196, 1.0), 2318 'lightyellow2': ( 0.93333333333333335, 2319 0.93333333333333335, 2320 0.81960784313725488, 2321 1.0), 2322 'lightyellow3': ( 0.80392156862745101, 2323 0.80392156862745101, 2324 0.70588235294117652, 2325 1.0), 2326 'lightyellow4': ( 0.54509803921568623, 2327 0.54509803921568623, 2328 0.47843137254901963, 2329 1.0), 2330 'lime': (0.0, 1.0, 0.0, 1.0), 2331 'lime green': ( 0.19607843137254902, 2332 0.80392156862745101, 2333 0.19607843137254902, 2334 1.0), 2335 'limegreen': ( 0.19607843137254902, 2336 0.80392156862745101, 2337 0.19607843137254902, 2338 1.0), 2339 'linen': ( 0.98039215686274506, 2340 0.94117647058823528, 2341 0.90196078431372551, 2342 1.0), 2343 'magenta': (1.0, 0.0, 1.0, 1.0), 2344 'magenta1': (1.0, 0.0, 1.0, 1.0), 2345 'magenta2': (0.93333333333333335, 0.0, 0.93333333333333335, 1.0), 2346 'magenta3': (0.80392156862745101, 0.0, 0.80392156862745101, 1.0), 2347 'magenta4': (0.54509803921568623, 0.0, 0.54509803921568623, 1.0), 2348 'maroon': ( 0.69019607843137254, 2349 0.18823529411764706, 2350 0.37647058823529411, 2351 1.0), 2352 'maroon1': (1.0, 0.20392156862745098, 0.70196078431372544, 1.0), 2353 'maroon2': ( 0.93333333333333335, 2354 0.18823529411764706, 2355 0.65490196078431373, 2356 1.0), 2357 'maroon3': ( 0.80392156862745101, 2358 0.16078431372549021, 2359 0.56470588235294117, 2360 1.0), 2361 'maroon4': ( 0.54509803921568623, 2362 0.10980392156862745, 2363 0.3843137254901961, 2364 1.0), 2365 'medium aquamarine': ( 0.40000000000000002, 2366 0.80392156862745101, 2367 0.66666666666666663, 2368 1.0), 2369 'medium blue': (0.0, 0.0, 0.80392156862745101, 1.0), 2370 'medium orchid': ( 0.72941176470588232, 2371 0.33333333333333331, 2372 0.82745098039215681, 2373 1.0), 2374 'medium purple': ( 0.57647058823529407, 2375 0.4392156862745098, 2376 0.85882352941176465, 2377 1.0), 2378 'medium sea green': ( 0.23529411764705882, 2379 0.70196078431372544, 2380 0.44313725490196076, 2381 1.0), 2382 'medium slate blue': ( 0.4823529411764706, 2383 0.40784313725490196, 2384 0.93333333333333335, 2385 1.0), 2386 'medium spring green': ( 0.0, 2387 0.98039215686274506, 2388 0.60392156862745094, 2389 1.0), 2390 'medium turquoise': ( 0.28235294117647058, 2391 0.81960784313725488, 2392 0.80000000000000004, 2393 1.0), 2394 'medium violet red': ( 0.7803921568627451, 2395 0.082352941176470587, 2396 0.52156862745098043, 2397 1.0), 2398 'mediumaquamarine': ( 0.40000000000000002, 2399 0.80392156862745101, 2400 0.66666666666666663, 2401 1.0), 2402 'mediumblue': (0.0, 0.0, 0.80392156862745101, 1.0), 2403 'mediumorchid': ( 0.72941176470588232, 2404 0.33333333333333331, 2405 0.82745098039215681, 2406 1.0), 2407 'mediumorchid1': (0.8784313725490196, 0.40000000000000002, 1.0, 1.0), 2408 'mediumorchid2': ( 0.81960784313725488, 2409 0.37254901960784315, 2410 0.93333333333333335, 2411 1.0), 2412 'mediumorchid3': ( 0.70588235294117652, 2413 0.32156862745098042, 2414 0.80392156862745101, 2415 1.0), 2416 'mediumorchid4': ( 0.47843137254901963, 2417 0.21568627450980393, 2418 0.54509803921568623, 2419 1.0), 2420 'mediumpurple': ( 0.57647058823529407, 2421 0.4392156862745098, 2422 0.85882352941176465, 2423 1.0), 2424 'mediumpurple1': (0.6705882352941176, 0.50980392156862742, 1.0, 1.0), 2425 'mediumpurple2': ( 0.62352941176470589, 2426 0.47450980392156861, 2427 0.93333333333333335, 2428 1.0), 2429 'mediumpurple3': ( 0.53725490196078429, 2430 0.40784313725490196, 2431 0.80392156862745101, 2432 1.0), 2433 'mediumpurple4': ( 0.36470588235294116, 2434 0.27843137254901962, 2435 0.54509803921568623, 2436 1.0), 2437 'mediumseagreen': ( 0.23529411764705882, 2438 0.70196078431372544, 2439 0.44313725490196076, 2440 1.0), 2441 'mediumslateblue': ( 0.4823529411764706, 2442 0.40784313725490196, 2443 0.93333333333333335, 2444 1.0), 2445 'mediumspringgreen': (0.0, 0.98039215686274506, 0.60392156862745094, 1.0), 2446 'mediumturquoise': ( 0.28235294117647058, 2447 0.81960784313725488, 2448 0.80000000000000004, 2449 1.0), 2450 'mediumvioletred': ( 0.7803921568627451, 2451 0.082352941176470587, 2452 0.52156862745098043, 2453 1.0), 2454 'midnight blue': ( 0.098039215686274508, 2455 0.098039215686274508, 2456 0.4392156862745098, 2457 1.0), 2458 'midnightblue': ( 0.098039215686274508, 2459 0.098039215686274508, 2460 0.4392156862745098, 2461 1.0), 2462 'mint cream': (0.96078431372549022, 1.0, 0.98039215686274506, 1.0), 2463 'mintcream': (0.96078431372549022, 1.0, 0.98039215686274506, 1.0), 2464 'misty rose': (1.0, 0.89411764705882357, 0.88235294117647056, 1.0), 2465 'mistyrose': (1.0, 0.89411764705882357, 0.88235294117647056, 1.0), 2466 'mistyrose1': (1.0, 0.89411764705882357, 0.88235294117647056, 1.0), 2467 'mistyrose2': ( 0.93333333333333335, 2468 0.83529411764705885, 2469 0.82352941176470584, 2470 1.0), 2471 'mistyrose3': ( 0.80392156862745101, 2472 0.71764705882352942, 2473 0.70980392156862748, 2474 1.0), 2475 'mistyrose4': ( 0.54509803921568623, 2476 0.49019607843137253, 2477 0.4823529411764706, 2478 1.0), 2479 'moccasin': (1.0, 0.89411764705882357, 0.70980392156862748, 1.0), 2480 'navajo white': (1.0, 0.87058823529411766, 0.67843137254901964, 1.0), 2481 'navajowhite': (1.0, 0.87058823529411766, 0.67843137254901964, 1.0), 2482 'navajowhite1': (1.0, 0.87058823529411766, 0.67843137254901964, 1.0), 2483 'navajowhite2': ( 0.93333333333333335, 2484 0.81176470588235294, 2485 0.63137254901960782, 2486 1.0), 2487 'navajowhite3': ( 0.80392156862745101, 2488 0.70196078431372544, 2489 0.54509803921568623, 2490 1.0), 2491 'navajowhite4': ( 0.54509803921568623, 2492 0.47450980392156861, 2493 0.36862745098039218, 2494 1.0), 2495 'navy': (0.0, 0.0, 0.50196078431372548, 1.0), 2496 'navy blue': (0.0, 0.0, 0.50196078431372548, 1.0), 2497 'navyblue': (0.0, 0.0, 0.50196078431372548, 1.0), 2498 'old lace': ( 0.99215686274509807, 2499 0.96078431372549022, 2500 0.90196078431372551, 2501 1.0), 2502 'oldlace': ( 0.99215686274509807, 2503 0.96078431372549022, 2504 0.90196078431372551, 2505 1.0), 2506 'olive': (0.5, 0.5, 0.0, 1.0), 2507 'olive drab': ( 0.41960784313725491, 2508 0.55686274509803924, 2509 0.13725490196078433, 2510 1.0), 2511 'olivedrab': ( 0.41960784313725491, 2512 0.55686274509803924, 2513 0.13725490196078433, 2514 1.0), 2515 'olivedrab1': (0.75294117647058822, 1.0, 0.24313725490196078, 1.0), 2516 'olivedrab2': ( 0.70196078431372544, 2517 0.93333333333333335, 2518 0.22745098039215686, 2519 1.0), 2520 'olivedrab3': ( 0.60392156862745094, 2521 0.80392156862745101, 2522 0.19607843137254902, 2523 1.0), 2524 'olivedrab4': ( 0.41176470588235292, 2525 0.54509803921568623, 2526 0.13333333333333333, 2527 1.0), 2528 'orange': (1.0, 0.6470588235294118, 0.0, 1.0), 2529 'orange red': (1.0, 0.27058823529411763, 0.0, 1.0), 2530 'orange1': (1.0, 0.6470588235294118, 0.0, 1.0), 2531 'orange2': (0.93333333333333335, 0.60392156862745094, 0.0, 1.0), 2532 'orange3': (0.80392156862745101, 0.52156862745098043, 0.0, 1.0), 2533 'orange4': (0.54509803921568623, 0.35294117647058826, 0.0, 1.0), 2534 'orangered': (1.0, 0.27058823529411763, 0.0, 1.0), 2535 'orangered1': (1.0, 0.27058823529411763, 0.0, 1.0), 2536 'orangered2': (0.93333333333333335, 0.25098039215686274, 0.0, 1.0), 2537 'orangered3': (0.80392156862745101, 0.21568627450980393, 0.0, 1.0), 2538 'orangered4': (0.54509803921568623, 0.14509803921568629, 0.0, 1.0), 2539 'orchid': ( 0.85490196078431369, 2540 0.4392156862745098, 2541 0.83921568627450982, 2542 1.0), 2543 'orchid1': (1.0, 0.51372549019607838, 0.98039215686274506, 1.0), 2544 'orchid2': ( 0.93333333333333335, 2545 0.47843137254901963, 2546 0.9137254901960784, 2547 1.0), 2548 'orchid3': ( 0.80392156862745101, 2549 0.41176470588235292, 2550 0.78823529411764703, 2551 1.0), 2552 'orchid4': ( 0.54509803921568623, 2553 0.27843137254901962, 2554 0.53725490196078429, 2555 1.0), 2556 'pale goldenrod': ( 0.93333333333333335, 2557 0.90980392156862744, 2558 0.66666666666666663, 2559 1.0), 2560 'pale green': ( 0.59607843137254901, 2561 0.98431372549019602, 2562 0.59607843137254901, 2563 1.0), 2564 'pale turquoise': ( 0.68627450980392157, 2565 0.93333333333333335, 2566 0.93333333333333335, 2567 1.0), 2568 'pale violet red': ( 0.85882352941176465, 2569 0.4392156862745098, 2570 0.57647058823529407, 2571 1.0), 2572 'palegoldenrod': ( 0.93333333333333335, 2573 0.90980392156862744, 2574 0.66666666666666663, 2575 1.0), 2576 'palegreen': ( 0.59607843137254901, 2577 0.98431372549019602, 2578 0.59607843137254901, 2579 1.0), 2580 'palegreen1': (0.60392156862745094, 1.0, 0.60392156862745094, 1.0), 2581 'palegreen2': ( 0.56470588235294117, 2582 0.93333333333333335, 2583 0.56470588235294117, 2584 1.0), 2585 'palegreen3': ( 0.48627450980392156, 2586 0.80392156862745101, 2587 0.48627450980392156, 2588 1.0), 2589 'palegreen4': ( 0.32941176470588235, 2590 0.54509803921568623, 2591 0.32941176470588235, 2592 1.0), 2593 'paleturquoise': ( 0.68627450980392157, 2594 0.93333333333333335, 2595 0.93333333333333335, 2596 1.0), 2597 'paleturquoise1': (0.73333333333333328, 1.0, 1.0, 1.0), 2598 'paleturquoise2': ( 0.68235294117647061, 2599 0.93333333333333335, 2600 0.93333333333333335, 2601 1.0), 2602 'paleturquoise3': ( 0.58823529411764708, 2603 0.80392156862745101, 2604 0.80392156862745101, 2605 1.0), 2606 'paleturquoise4': ( 0.40000000000000002, 2607 0.54509803921568623, 2608 0.54509803921568623, 2609 1.0), 2610 'palevioletred': ( 0.85882352941176465, 2611 0.4392156862745098, 2612 0.57647058823529407, 2613 1.0), 2614 'palevioletred1': (1.0, 0.50980392156862742, 0.6705882352941176, 1.0), 2615 'palevioletred2': ( 0.93333333333333335, 2616 0.47450980392156861, 2617 0.62352941176470589, 2618 1.0), 2619 'palevioletred3': ( 0.80392156862745101, 2620 0.40784313725490196, 2621 0.53725490196078429, 2622 1.0), 2623 'palevioletred4': ( 0.54509803921568623, 2624 0.27843137254901962, 2625 0.36470588235294116, 2626 1.0), 2627 'papaya whip': (1.0, 0.93725490196078431, 0.83529411764705885, 1.0), 2628 'papayawhip': (1.0, 0.93725490196078431, 0.83529411764705885, 1.0), 2629 'peach puff': (1.0, 0.85490196078431369, 0.72549019607843135, 1.0), 2630 'peachpuff': (1.0, 0.85490196078431369, 0.72549019607843135, 1.0), 2631 'peachpuff1': (1.0, 0.85490196078431369, 0.72549019607843135, 1.0), 2632 'peachpuff2': ( 0.93333333333333335, 2633 0.79607843137254897, 2634 0.67843137254901964, 2635 1.0), 2636 'peachpuff3': ( 0.80392156862745101, 2637 0.68627450980392157, 2638 0.58431372549019611, 2639 1.0), 2640 'peachpuff4': ( 0.54509803921568623, 2641 0.46666666666666667, 2642 0.396078431372549, 2643 1.0), 2644 'peru': ( 0.80392156862745101, 2645 0.52156862745098043, 2646 0.24705882352941178, 2647 1.0), 2648 'pink': (1.0, 0.75294117647058822, 0.79607843137254897, 1.0), 2649 'pink1': (1.0, 0.70980392156862748, 0.77254901960784317, 1.0), 2650 'pink2': ( 0.93333333333333335, 2651 0.66274509803921566, 2652 0.72156862745098038, 2653 1.0), 2654 'pink3': ( 0.80392156862745101, 2655 0.56862745098039214, 2656 0.61960784313725492, 2657 1.0), 2658 'pink4': ( 0.54509803921568623, 2659 0.38823529411764707, 2660 0.42352941176470588, 2661 1.0), 2662 'plum': (0.8666666666666667, 0.62745098039215685, 0.8666666666666667, 1.0), 2663 'plum1': (1.0, 0.73333333333333328, 1.0, 1.0), 2664 'plum2': ( 0.93333333333333335, 2665 0.68235294117647061, 2666 0.93333333333333335, 2667 1.0), 2668 'plum3': ( 0.80392156862745101, 2669 0.58823529411764708, 2670 0.80392156862745101, 2671 1.0), 2672 'plum4': ( 0.54509803921568623, 2673 0.40000000000000002, 2674 0.54509803921568623, 2675 1.0), 2676 'powder blue': ( 0.69019607843137254, 2677 0.8784313725490196, 2678 0.90196078431372551, 2679 1.0), 2680 'powderblue': ( 0.69019607843137254, 2681 0.8784313725490196, 2682 0.90196078431372551, 2683 1.0), 2684 'purple': ( 0.62745098039215685, 2685 0.12549019607843137, 2686 0.94117647058823528, 2687 1.0), 2688 'purple1': (0.60784313725490191, 0.18823529411764706, 1.0, 1.0), 2689 'purple2': ( 0.56862745098039214, 2690 0.17254901960784313, 2691 0.93333333333333335, 2692 1.0), 2693 'purple3': ( 0.49019607843137253, 2694 0.14901960784313725, 2695 0.80392156862745101, 2696 1.0), 2697 'purple4': ( 0.33333333333333331, 2698 0.10196078431372549, 2699 0.54509803921568623, 2700 1.0), 2701 'red': (1.0, 0.0, 0.0, 1.0), 2702 'red1': (1.0, 0.0, 0.0, 1.0), 2703 'red2': (0.93333333333333335, 0.0, 0.0, 1.0), 2704 'red3': (0.80392156862745101, 0.0, 0.0, 1.0), 2705 'red4': (0.54509803921568623, 0.0, 0.0, 1.0), 2706 'rosy brown': ( 0.73725490196078436, 2707 0.5607843137254902, 2708 0.5607843137254902, 2709 1.0), 2710 'rosybrown': ( 0.73725490196078436, 2711 0.5607843137254902, 2712 0.5607843137254902, 2713 1.0), 2714 'rosybrown1': (1.0, 0.75686274509803919, 0.75686274509803919, 1.0), 2715 'rosybrown2': ( 0.93333333333333335, 2716 0.70588235294117652, 2717 0.70588235294117652, 2718 1.0), 2719 'rosybrown3': ( 0.80392156862745101, 2720 0.60784313725490191, 2721 0.60784313725490191, 2722 1.0), 2723 'rosybrown4': ( 0.54509803921568623, 2724 0.41176470588235292, 2725 0.41176470588235292, 2726 1.0), 2727 'royal blue': ( 0.25490196078431371, 2728 0.41176470588235292, 2729 0.88235294117647056, 2730 1.0), 2731 'royalblue': ( 0.25490196078431371, 2732 0.41176470588235292, 2733 0.88235294117647056, 2734 1.0), 2735 'royalblue1': (0.28235294117647058, 0.46274509803921571, 1.0, 1.0), 2736 'royalblue2': ( 0.2627450980392157, 2737 0.43137254901960786, 2738 0.93333333333333335, 2739 1.0), 2740 'royalblue3': ( 0.22745098039215686, 2741 0.37254901960784315, 2742 0.80392156862745101, 2743 1.0), 2744 'royalblue4': ( 0.15294117647058825, 2745 0.25098039215686274, 2746 0.54509803921568623, 2747 1.0), 2748 'saddle brown': ( 0.54509803921568623, 2749 0.27058823529411763, 2750 0.074509803921568626, 2751 1.0), 2752 'saddlebrown': ( 0.54509803921568623, 2753 0.27058823529411763, 2754 0.074509803921568626, 2755 1.0), 2756 'salmon': ( 0.98039215686274506, 2757 0.50196078431372548, 2758 0.44705882352941179, 2759 1.0), 2760 'salmon1': (1.0, 0.5490196078431373, 0.41176470588235292, 1.0), 2761 'salmon2': ( 0.93333333333333335, 2762 0.50980392156862742, 2763 0.3843137254901961, 2764 1.0), 2765 'salmon3': ( 0.80392156862745101, 2766 0.4392156862745098, 2767 0.32941176470588235, 2768 1.0), 2769 'salmon4': ( 0.54509803921568623, 2770 0.29803921568627451, 2771 0.22352941176470589, 2772 1.0), 2773 'sandy brown': ( 0.95686274509803926, 2774 0.64313725490196083, 2775 0.37647058823529411, 2776 1.0), 2777 'sandybrown': ( 0.95686274509803926, 2778 0.64313725490196083, 2779 0.37647058823529411, 2780 1.0), 2781 'sea green': ( 0.1803921568627451, 2782 0.54509803921568623, 2783 0.3411764705882353, 2784 1.0), 2785 'seagreen': ( 0.1803921568627451, 2786 0.54509803921568623, 2787 0.3411764705882353, 2788 1.0), 2789 'seagreen1': (0.32941176470588235, 1.0, 0.62352941176470589, 1.0), 2790 'seagreen2': ( 0.30588235294117649, 2791 0.93333333333333335, 2792 0.58039215686274515, 2793 1.0), 2794 'seagreen3': ( 0.2627450980392157, 2795 0.80392156862745101, 2796 0.50196078431372548, 2797 1.0), 2798 'seagreen4': ( 0.1803921568627451, 2799 0.54509803921568623, 2800 0.3411764705882353, 2801 1.0), 2802 'seashell': (1.0, 0.96078431372549022, 0.93333333333333335, 1.0), 2803 'seashell1': (1.0, 0.96078431372549022, 0.93333333333333335, 1.0), 2804 'seashell2': ( 0.93333333333333335, 2805 0.89803921568627454, 2806 0.87058823529411766, 2807 1.0), 2808 'seashell3': ( 0.80392156862745101, 2809 0.77254901960784317, 2810 0.74901960784313726, 2811 1.0), 2812 'seashell4': ( 0.54509803921568623, 2813 0.52549019607843139, 2814 0.50980392156862742, 2815 1.0), 2816 'sienna': ( 0.62745098039215685, 2817 0.32156862745098042, 2818 0.17647058823529413, 2819 1.0), 2820 'sienna1': (1.0, 0.50980392156862742, 0.27843137254901962, 1.0), 2821 'sienna2': ( 0.93333333333333335, 2822 0.47450980392156861, 2823 0.25882352941176473, 2824 1.0), 2825 'sienna3': ( 0.80392156862745101, 2826 0.40784313725490196, 2827 0.22352941176470589, 2828 1.0), 2829 'sienna4': ( 0.54509803921568623, 2830 0.27843137254901962, 2831 0.14901960784313725, 2832 1.0), 2833 'silver': (0.75, 0.75, 0.75, 1.0), 2834 'sky blue': ( 0.52941176470588236, 2835 0.80784313725490198, 2836 0.92156862745098034, 2837 1.0), 2838 'skyblue': ( 0.52941176470588236, 2839 0.80784313725490198, 2840 0.92156862745098034, 2841 1.0), 2842 'skyblue1': (0.52941176470588236, 0.80784313725490198, 1.0, 1.0), 2843 'skyblue2': ( 0.49411764705882355, 2844 0.75294117647058822, 2845 0.93333333333333335, 2846 1.0), 2847 'skyblue3': ( 0.42352941176470588, 2848 0.65098039215686276, 2849 0.80392156862745101, 2850 1.0), 2851 'skyblue4': ( 0.29019607843137257, 2852 0.4392156862745098, 2853 0.54509803921568623, 2854 1.0), 2855 'slate blue': ( 0.41568627450980394, 2856 0.35294117647058826, 2857 0.80392156862745101, 2858 1.0), 2859 'slate gray': ( 0.4392156862745098, 2860 0.50196078431372548, 2861 0.56470588235294117, 2862 1.0), 2863 'slate grey': ( 0.4392156862745098, 2864 0.50196078431372548, 2865 0.56470588235294117, 2866 1.0), 2867 'slateblue': ( 0.41568627450980394, 2868 0.35294117647058826, 2869 0.80392156862745101, 2870 1.0), 2871 'slateblue1': (0.51372549019607838, 0.43529411764705883, 1.0, 1.0), 2872 'slateblue2': ( 0.47843137254901963, 2873 0.40392156862745099, 2874 0.93333333333333335, 2875 1.0), 2876 'slateblue3': ( 0.41176470588235292, 2877 0.34901960784313724, 2878 0.80392156862745101, 2879 1.0), 2880 'slateblue4': ( 0.27843137254901962, 2881 0.23529411764705882, 2882 0.54509803921568623, 2883 1.0), 2884 'slategray': ( 0.4392156862745098, 2885 0.50196078431372548, 2886 0.56470588235294117, 2887 1.0), 2888 'slategray1': (0.77647058823529413, 0.88627450980392153, 1.0, 1.0), 2889 'slategray2': ( 0.72549019607843135, 2890 0.82745098039215681, 2891 0.93333333333333335, 2892 1.0), 2893 'slategray3': ( 0.62352941176470589, 2894 0.71372549019607845, 2895 0.80392156862745101, 2896 1.0), 2897 'slategray4': ( 0.42352941176470588, 2898 0.4823529411764706, 2899 0.54509803921568623, 2900 1.0), 2901 'slategrey': ( 0.4392156862745098, 2902 0.50196078431372548, 2903 0.56470588235294117, 2904 1.0), 2905 'snow': (1.0, 0.98039215686274506, 0.98039215686274506, 1.0), 2906 'snow1': (1.0, 0.98039215686274506, 0.98039215686274506, 1.0), 2907 'snow2': ( 0.93333333333333335, 2908 0.9137254901960784, 2909 0.9137254901960784, 2910 1.0), 2911 'snow3': ( 0.80392156862745101, 2912 0.78823529411764703, 2913 0.78823529411764703, 2914 1.0), 2915 'snow4': ( 0.54509803921568623, 2916 0.53725490196078429, 2917 0.53725490196078429, 2918 1.0), 2919 'spring green': (0.0, 1.0, 0.49803921568627452, 1.0), 2920 'springgreen': (0.0, 1.0, 0.49803921568627452, 1.0), 2921 'springgreen1': (0.0, 1.0, 0.49803921568627452, 1.0), 2922 'springgreen2': (0.0, 0.93333333333333335, 0.46274509803921571, 1.0), 2923 'springgreen3': (0.0, 0.80392156862745101, 0.40000000000000002, 1.0), 2924 'springgreen4': (0.0, 0.54509803921568623, 0.27058823529411763, 1.0), 2925 'steel blue': ( 0.27450980392156865, 2926 0.50980392156862742, 2927 0.70588235294117652, 2928 1.0), 2929 'steelblue': ( 0.27450980392156865, 2930 0.50980392156862742, 2931 0.70588235294117652, 2932 1.0), 2933 'steelblue1': (0.38823529411764707, 0.72156862745098038, 1.0, 1.0), 2934 'steelblue2': ( 0.36078431372549019, 2935 0.67450980392156867, 2936 0.93333333333333335, 2937 1.0), 2938 'steelblue3': ( 0.30980392156862746, 2939 0.58039215686274515, 2940 0.80392156862745101, 2941 1.0), 2942 'steelblue4': ( 0.21176470588235294, 2943 0.39215686274509803, 2944 0.54509803921568623, 2945 1.0), 2946 'tan': (0.82352941176470584, 0.70588235294117652, 0.5490196078431373, 1.0), 2947 'tan1': (1.0, 0.6470588235294118, 0.30980392156862746, 1.0), 2948 'tan2': ( 0.93333333333333335, 2949 0.60392156862745094, 2950 0.28627450980392155, 2951 1.0), 2952 'tan3': ( 0.80392156862745101, 2953 0.52156862745098043, 2954 0.24705882352941178, 2955 1.0), 2956 'tan4': ( 0.54509803921568623, 2957 0.35294117647058826, 2958 0.16862745098039217, 2959 1.0), 2960 'teal': (0.0, 0.5, 0.5, 1.0), 2961 'thistle': ( 0.84705882352941175, 2962 0.74901960784313726, 2963 0.84705882352941175, 2964 1.0), 2965 'thistle1': (1.0, 0.88235294117647056, 1.0, 1.0), 2966 'thistle2': ( 0.93333333333333335, 2967 0.82352941176470584, 2968 0.93333333333333335, 2969 1.0), 2970 'thistle3': ( 0.80392156862745101, 2971 0.70980392156862748, 2972 0.80392156862745101, 2973 1.0), 2974 'thistle4': ( 0.54509803921568623, 2975 0.4823529411764706, 2976 0.54509803921568623, 2977 1.0), 2978 'tomato': (1.0, 0.38823529411764707, 0.27843137254901962, 1.0), 2979 'tomato1': (1.0, 0.38823529411764707, 0.27843137254901962, 1.0), 2980 'tomato2': ( 0.93333333333333335, 2981 0.36078431372549019, 2982 0.25882352941176473, 2983 1.0), 2984 'tomato3': ( 0.80392156862745101, 2985 0.30980392156862746, 2986 0.22352941176470589, 2987 1.0), 2988 'tomato4': ( 0.54509803921568623, 2989 0.21176470588235294, 2990 0.14901960784313725, 2991 1.0), 2992 'turquoise': ( 0.25098039215686274, 2993 0.8784313725490196, 2994 0.81568627450980391, 2995 1.0), 2996 'turquoise1': (0.0, 0.96078431372549022, 1.0, 1.0), 2997 'turquoise2': (0.0, 0.89803921568627454, 0.93333333333333335, 1.0), 2998 'turquoise3': (0.0, 0.77254901960784317, 0.80392156862745101, 1.0), 2999 'turquoise4': (0.0, 0.52549019607843139, 0.54509803921568623, 1.0), 3000 'violet': ( 0.93333333333333335, 3001 0.50980392156862742, 3002 0.93333333333333335, 3003 1.0), 3004 'violet red': ( 0.81568627450980391, 3005 0.12549019607843137, 3006 0.56470588235294117, 3007 1.0), 3008 'violetred': ( 0.81568627450980391, 3009 0.12549019607843137, 3010 0.56470588235294117, 3011 1.0), 3012 'violetred1': (1.0, 0.24313725490196078, 0.58823529411764708, 1.0), 3013 'violetred2': ( 0.93333333333333335, 3014 0.22745098039215686, 3015 0.5490196078431373, 3016 1.0), 3017 'violetred3': ( 0.80392156862745101, 3018 0.19607843137254902, 3019 0.47058823529411764, 3020 1.0), 3021 'violetred4': ( 0.54509803921568623, 3022 0.13333333333333333, 3023 0.32156862745098042, 3024 1.0), 3025 'wheat': ( 0.96078431372549022, 3026 0.87058823529411766, 3027 0.70196078431372544, 3028 1.0), 3029 'wheat1': (1.0, 0.90588235294117647, 0.72941176470588232, 1.0), 3030 'wheat2': ( 0.93333333333333335, 3031 0.84705882352941175, 3032 0.68235294117647061, 3033 1.0), 3034 'wheat3': ( 0.80392156862745101, 3035 0.72941176470588232, 3036 0.58823529411764708, 3037 1.0), 3038 'wheat4': ( 0.54509803921568623, 3039 0.49411764705882355, 3040 0.40000000000000002, 3041 1.0), 3042 'white': (1.0, 1.0, 1.0, 1.0), 3043 'white smoke': ( 0.96078431372549022, 3044 0.96078431372549022, 3045 0.96078431372549022, 3046 1.0), 3047 'whitesmoke': ( 0.96078431372549022, 3048 0.96078431372549022, 3049 0.96078431372549022, 3050 1.0), 3051 'yellow': (1.0, 1.0, 0.0, 1.0), 3052 'yellow green': ( 0.60392156862745094, 3053 0.80392156862745101, 3054 0.19607843137254902, 3055 1.0), 3056 'yellow1': (1.0, 1.0, 0.0, 1.0), 3057 'yellow2': (0.93333333333333335, 0.93333333333333335, 0.0, 1.0), 3058 'yellow3': (0.80392156862745101, 0.80392156862745101, 0.0, 1.0), 3059 'yellow4': (0.54509803921568623, 0.54509803921568623, 0.0, 1.0), 3060 'yellowgreen': ( 0.60392156862745094, 3061 0.80392156862745101, 3062 0.19607843137254902, 3063 1.0)} 3064 3065 palettes = { 3066 "gray": GradientPalette("black", "white"), 3067 "red-blue": GradientPalette("red", "blue"), 3068 "red-purple-blue": AdvancedGradientPalette(["red", "purple", "blue"]), 3069 "red-green": GradientPalette("red", "green"), 3070 "red-yellow-green": AdvancedGradientPalette(["red", "yellow", "green"]), 3071 "red-black-green": AdvancedGradientPalette(["red", "black", "green"]), 3072 "rainbow": RainbowPalette(), 3073 "heat": AdvancedGradientPalette(["red", "yellow", "white"], 3074 indices=[0, 192, 255]), 3075 "terrain": AdvancedGradientPalette(["hsv(120, 100%, 65%)", 3076 "hsv(60, 100%, 90%)", "hsv(0, 0%, 95%)"]) 3077 } 3078

   Home       Trees       Indices       Help