IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
find_color.m
Go to the documentation of this file.
1 %>@ingroup graphicsapi
2 %>@file
3 %>@brief Returns a color (3-element RGB vector)
4 %
5 %> @param i
6 %> @return x 3-element RGB vector
7 function x = find_color(i)
8 fig_assert();
9 global COLORS;
10 x = COLORS{mod(i-1, length(COLORS))+1};
11 
12 % Converts to 0-1 if COLORS has values above 0-1
13 cc = cell2mat(COLORS);
14 if any(cc(:) > 1)
15  x = x/255;
16 end;
function find_color(in i)
function fig_assert()