1 %>@ingroup
string htmlgen
3 %>@brief Calculates a background color based on percentage
5 %> Sqrt improves the color representation, because it makes low values already some color
8 %> - Green and blue: sqrt(value)/sqrt(sum of row)
12 %> @param flag_hex =0. If
true, returns hexadecimal strings to insert into HTML code, otherwise returns 3-element vectors containing the RGB intensities.
13 %> @
return [bgcolor] or [bgcolor, fgcolor]
14 function varargout =
cellcolor(n, ma, flag_hex)
16 if ~exist('flag_hex', 'var')
28 bgcolor = [1, [1, 1]*(1-sqrt(n)/ma)];
40 varargout = {bgcolor};
42 varargout = {bgcolor, fgcolor};
function cellcolor(in n, in ma, in flag_hex)