ColorTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

ColorTools

  

ReducePalette

  

reduce a large list of colors to a smaller, representative list

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ReducePalette(colors)

Parameters

colors

-

a list of Color objects

Description

• 

This command reduces a large list of colors down to a small representative list of less than 20 colors.

Examples

withColorTools:

fullseqColorRGB,1i,i,1i,i=0..1,0.05

fullRGB : 1 0 1,RGB : 0.95 0.05 0.95,RGB : 0.9 0.1 0.9,RGB : 0.85 0.15 0.85,RGB : 0.8 0.2 0.8,RGB : 0.75 0.25 0.75,RGB : 0.7 0.3 0.7,RGB : 0.65 0.35 0.65,RGB : 0.6 0.4 0.6,RGB : 0.55 0.45 0.55,RGB : 0.5 0.5 0.5,RGB : 0.45 0.55 0.45,RGB : 0.4 0.6 0.4,RGB : 0.35 0.65 0.35,RGB : 0.3 0.7 0.3,RGB : 0.25 0.75 0.25,RGB : 0.2 0.8 0.2,RGB : 0.15 0.85 0.15,RGB : 0.1 0.9 0.1,RGB : 0.05 0.95 0.05,RGB : 0 1 0

(4.1)

numelemsfull

21

(4.2)

reducedReducePalettefull

reducedLab : 80 -77.2 73.1,Lab : 51 69.4 -43.8,Lab : 65.1 -49.7 42.5,Lab : 50.4 28.9 -19.2,Lab : 55.9 -14 10.7

(4.3)

numelemsreduced

5

(4.4)

imgfilecatkerneloptsdatadir,/images/antennas.jpg:

ImageTools:-EmbedImageTools:-Readimgfile

fullColorsFromImageimgfile:

numelemsfull

1225

(4.5)

reducedReducePalettefull

reducedLab : 43.9 0.311 13.6,Lab : 58.1 0.212 17.5,Lab : 32.5 0.717 9.18,Lab : 57.3 -1.57 -5.13,Lab : 69.3 -1.38 8,Lab : 75.7 -1 -0.58,Lab : 87.3 -1.02 5.48

(4.6)

numelemsreduced

7

(4.7)

Compatibility

• 

The ColorTools[ReducePalette] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

ColorTools

ColorTools/Color

ColorTools/ColorsFromImage

ColorTools/ColorSpaces

ColorTools/Palette

ImageTools