HOW TO
This article provides sample Avenue code for creating a custom color palette file (.avp).
Code:
'Create Custom Color Palette
'Creates an Object Database file to store the colors in
defName = FileName.Make("$AVHOME/symbols").MakeTmp("mycolors","avp")
theODBfile = FileDialog.Put(defName,"*.avp","Save Color Palette As")
myODB = ODB.Make(theODBfile)
'Create a symbol list and add colors to it
'Colors are defined by their RGB (Red, Green, Blue) values.
'Modify the RGB values to the RGB values of the colors you want to add
aSymbolList = SymbolList.Make
for each i in 0..255 by 5
myColor = Color.Make
myColor.SetRGBList({0,255,i})
aSymbolList.Add(myColor)
end
'Create a palette, add the symbol list to the palette and save to the file
myPalette = Palette.Make
myPalette.SetList(#PALETTE_LIST_COLOR, aSymbolList)
myODB.Add(myPalette)
myODB.Commit
Article ID:000005091
Get help from ArcGIS experts
Download the Esri Support App