![]() |
![]() |
Palettes.CreateFromSelection
Function CreateFromSelection(Name As String, [FileName As String], [Overwrite As Boolean = False]) As Palette
Member of Palettes
The CreateFromSelection method creates a new custom color palette based on the colors used in a selection of objects.
The following code example displays the number of colors used in the selection:
Sub Test() Dim pal As Palette Set pal = Palettes.CreateFromSelection("Selection Colors", _ Application.UserDataPath & "Palettes\SelectionColors.cpl", True) MsgBox "The selection uses " & pal.ColorCount & " colors" pal.Close End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.