3 @brief Colors used by pyclustering library for visualization. 5 @authors Andrei Novikov (pyclustering@yandex.ru) 7 @copyright GNU Public License 9 @cond GNU_PUBLIC_LICENSE 10 PyClustering is free software: you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation, either version 3 of the License, or 13 (at your option) any later version. 15 PyClustering is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 20 You should have received a copy of the GNU General Public License 21 along with this program. If not, see <http://www.gnu.org/licenses/>. 29 @brief Consists titles of colors that are used by pyclustering for visualization. 36 @brief Returns color using round robin to avoid out of range exception. 38 @param[in] sequential_index (uint): Index that should be converted to valid color index. 40 @return (uint) Color from list color.TITLES. 43 return color.TITLES[sequential_index % len(color.TITLES)]
47 TITLES = [
'red',
'blue',
'darkgreen',
'gold',
'violet',
48 'deepskyblue',
'darkgrey',
'lightsalmon',
'deeppink',
'yellow',
49 'black',
'mediumspringgreen',
'orange',
'darkviolet',
'darkblue',
50 'silver',
'lime',
'pink',
'brown',
'bisque',
51 'dimgray',
'firebrick',
'darksalmon',
'chartreuse',
'skyblue',
52 'purple',
'fuchsia',
'palegoldenrod',
'coral',
'hotpink',
53 'gray',
'tan',
'crimson',
'teal',
'olive']
def get_color(sequential_index)
Returns color using round robin to avoid out of range exception.
Consists titles of colors that are used by pyclustering for visualization.