numcolors - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ColorTools[Palette]

  

numcolors

  

retrieve the number of defining colors in a Palette object

  

numelems

  

retrieve the current total number of colors in a Palette object

 

Calling Sequence

Parameters

numcolors

numelems

Examples

Compatibility

Calling Sequence

numcolors(P)

numelems(P)

Parameters

P

-

Palette object created with ColorTools:-Palette

numcolors

• 

The numcolors command returns the number of indexable colors in a Palette object when it was created before any automatic palette expansion.

numelems

• 

The numelems command returns the number of colors in a Palette object including any colors added during automatic palette expansion.

Examples

PColorTools:-GetPalettespring

PPalette Spring:BlueRoseYellowGreenBlueGreenVioletCobaltYellowPurpleRedGreenBluePaleGreenOrangePurpleGreenSeaBluePaleYellowPaleBlueGreen

(1)

numcolorsP

16

(2)

numelemsP

16

(3)

PnumcolorsP+10

RGB : 0.417 0.453 0.12

(4)

numcolorsP

16

(5)

numelemsP

27

(6)

Compatibility

• 

The ColorTools[Palette][numcolors] and ColorTools[Palette][numelems] commands were introduced in Maple 16.

• 

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

See Also

ColorTools[Palette]

numelems