Object Model Reference : Classes : P : Palette : Methods : Palette.Colors |
Function Colors() As Colors
Member of Palette
The Colors property returns the collection of all colors in a palette.
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 |
Copyright 2013 Corel Corporation. All rights reserved.