API Documentation > CorelDRAW > 2025-v26 > Palette > IVGPalette
Palette.ColorCount property
Gets the number of colors in a color palette
Syntax:
Property Get ColorCount() As Long
Remarks:
The ColorCount property returns the number of colors in a color palette. The ColorCount property functions similarly to, but faster than, Colors.Count.
Examples:
The following VBA example displays the total number of colors found in the default palette.
Sub Test()
Dim pal As Palette
Set pal = ActivePalette
MsgBox "Default palette contains " & pal.ColorCount & " color(s)" 
End Sub