API Documentation > CorelDRAW > 2025-v26 > Palette > IVGPalette
Palette.AddColor method
Adds a color to a custom color palette
Syntax:
Sub AddColor(ByVal Color As Color)
Parameters:
Name Type Description
Color
Remarks:
The AddColor method adds a color to a custom color palette.
Examples:
The following VBA example creates a new palette and adds 21 colors with different shades of cyan varying by steps of 5%.
Sub Test()
Dim pal As Palette
Dim lvl As Long
Dim c As New Color
Set pal = Palettes.Create("Shades of Cyan",, True)
For lvl = 0 To 100 Step 5
  c.CMYKAssign lvl, 0, 0, 0
  pal.AddColor c
Next lvl
pal.Save 
End Sub