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