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

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

> 

P≔ColorTools:-GetPalette⁡spring

P≔Palette Spring:⁢Blue⁢Rose⁢YellowGreen⁢BlueGreen⁢Violet⁢Cobalt⁢Yellow⁢PurpleRed⁢GreenBlue⁢PaleGreen⁢Orange⁢Purple⁢Green⁢SeaBlue⁢PaleYellow⁢PaleBlueGreen

(1)
> 

numcolors⁡P

16

(2)
> 

numelems⁡P

16

(3)
> 

Pnumcolors⁡P+10

⟨RGB : 0.417 0.453 0.12⟩

(4)
> 

numcolors⁡P

16

(5)
> 

numelems⁡P

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