pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
color.py
1 """!
2 
3 @brief Colors used by pyclustering library for visualization.
4 
5 @authors Andrei Novikov (pyclustering@yandex.ru)
6 @date 2014-2020
7 @copyright BSD-3-Clause
8 
9 """
10 
11 
12 class color:
13  """!
14  @brief Consists titles of colors that are used by pyclustering for visualization.
15 
16  """
17 
18  @staticmethod
19  def get_color(sequential_index):
20  """!
21  @brief Returns color using round robin to avoid out of range exception.
22 
23  @param[in] sequential_index (uint): Index that should be converted to valid color index.
24 
25  @return (uint) Color from list color.TITLES.
26 
27  """
28  return color.TITLES[sequential_index % len(color.TITLES)]
29 
30 
31 
32  TITLES = [ 'red', 'blue', 'darkgreen', 'gold', 'violet',
33  'deepskyblue', 'darkgrey', 'lightsalmon', 'deeppink', 'yellow',
34  'black', 'mediumspringgreen', 'orange', 'darkviolet', 'darkblue',
35  'silver', 'lime', 'pink', 'brown', 'bisque',
36  'dimgray', 'firebrick', 'darksalmon', 'chartreuse', 'skyblue',
37  'purple', 'fuchsia', 'palegoldenrod', 'coral', 'hotpink',
38  'gray', 'tan', 'crimson', 'teal', 'olive']
pyclustering.utils.color.color.get_color
def get_color(sequential_index)
Returns color using round robin to avoid out of range exception.
Definition: color.py:19
pyclustering.utils.color.color
Consists titles of colors that are used by pyclustering for visualization.
Definition: color.py:12