fabien van mook

all packages "fvm-*"

package "fvm-colourgrade"

function file "bluered.m"

Function [cm,icmsecond] = bluered(n,icmsecond,reverse,compress,show)

returns colourmap cm (matrix of three columns
for the red-green-blue colour values from 0
to 1, inclusively) with n colours, which form
two parts: the first part ranges from blue to
cyan and the second part from yellow to red.

If input argument n is not given at input, it
defaults to 20.

Input argument icmsecond holds the row index 
in the colourmap where the second part ranging
from yellow to red starts. If the argument is 
not given at input, it is calculated by:
  icmsecond = floor(n/2) + 1;
and thus both parts have approximately the
same number of colours. The eventual value
of icmsecond is also available in the second
output argument.

If input argument reverse is true, the colours
range from cyan to blue and from red to yellow.
If the argument is not given at input, it defaults
to false.

If input argument compress is true, the colours
of the first part, i.e. with indices < icmsecond,
range fully between the extreme blue and cyan 
tones, and the second part, i.e. with indices 
>= icmsecond, range fully between the extreme 
yellow and red tones.

If input argument compress is false, the colours
of each part have an equal gradation (the tones
vary with the same "steepness"). If the argument
is not given at input, it defaults to false.

If input argument show is true, the colourmap
is plotted in two figures on screen. If the
argument is not given at input, it defaults to 
false.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-colourgrade" under GNU GPLv3+