Previous Document Next Document

Object Model Reference : Classes : P : Palette : Methods : Palette.Colors


Palette.Colors

Function Colors() As Colors

Description

Member of Palette

The Colors property returns the collection of all colors in a palette.

VBA example

The following VBA example displays the name of the default color palette and the number of colors it contains.

Sub Test()
 Dim pal As Palette
 Set pal = ActivePalette
 MsgBox "Default palette '" & pal.Name & "' contains " & pal.Colors.Count & " color(s)"
End Sub
Sub Test()
 Dim s As Shape
 Set s = ActiveLayer.CreateEllipse2(2, 2, 1)
 s.Fill.ApplyUniformFill ActivePalette.Colors(15)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.