add matching colors to a palette - Maple Help

Home : Support : Online Help : Graphics : Packages : ColorTools : ColorTools/ExpandPalette

ColorTools[ExpandPalette] - add matching colors to a palette

 Calling Sequence ExpandPalette(P)

Parameters

 P - list of colors in formats recognized by ColorTools, or a Palette created with ColorTools[Palette]

Description

 • The ExpandPalette command computes additional colors that can be added to a palette. Colors are selected to match well with at least one input color but not be too close to any of the input colors.  The ColorTools commands Lighten, Saturate, Darken, Desaturate, NeutralSpread, and HueSplit are used to generate candidate colors.  The colors are then filtered based on the options to remove undesirable colors.  Then a greedy method is used to select the desired number of candidates that are perceptually far away from the input colors.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $\mathrm{ExpandPalette}\left(\mathrm{GetPalette}\left("MapleV"\right),\mathrm{number}=2\right)$
 $\left[{⟨}\colorbox[rgb]{0.137254901960784,0.486274509803922,0.556862745098039}{{RGB : 0.137 0.488 0.557}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.623529411764706,1}{RGB : 0 0.625 1}{⟩}\right]$ (1)
 > $P:=\mathrm{ExpandPalette}\left(\left["DarkRed","Green","Navy"\right],\mathrm{number}=3\right)$
 ${P}{:=}\left[{⟨}\colorbox[rgb]{0,0.501960784313725,0.501960784313725}{{RGB : 0 0.502 0.502}}{⟩}{,}{⟨}\colorbox[rgb]{0.545098039215686,0,0.545098039215686}{{RGB : 0.545 0 0.545}}{⟩}{,}{⟨}\colorbox[rgb]{0.545098039215686,0.545098039215686,0}{RGB : 0.545 0.545 0}{⟩}\right]$ (2)
 > $\mathrm{Swatches}\left(\left["DarkRed","Green","Navy",{P}_{[]}\right],\mathrm{rows}=2\right)$