IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy

Detailed Description

Calculates a background color based on percentage.

Sqrt improves the color representation, because it makes low values already some color Color formula is:

  • Red: maximum;
  • Green and blue: sqrt(value)/sqrt(sum of row)

Definition in file cellcolor.m.

Go to the source code of this file.

Functions

function cellcolor (in n, in ma, in flag_hex)
 

Function Documentation

function cellcolor ( in  n,
in  ma,
in  flag_hex 
)
Parameters
nintensity
maMaximum
flag_hex=0. If true, returns hexadecimal strings to insert into HTML code, otherwise returns 3-element vectors containing the RGB intensities.
Returns
[bgcolor] or [bgcolor, fgcolor]