blendColorPalette#
Purpose#
Create a new palette that blends between a list of colors.
Format#
- color_blend = blendColorPalette(colors, n_colors)#
- Parameters:
colors (Nx1 string array) – List of existing colors.
n_colors (scalar) – The number of colors to create for the new palette.
- Returns:
color_blend (n_colorsx1 string array) – containing color palette.
Format#
/*
** Make color palette with 5 colors
** blending red, green, and yellow
*/
clrs = blendColorPalette("Red"$|"Green"$|"Yellow", 5);
The resulting colors :
clrs = #ff0000
#813f00
#008000
#80c000
#ffff00
Remarks#
n_colors must be greater than the length of the colors vector.