Skip to content

Commit

Permalink
Define RGB Color (ArcView3)
Browse files Browse the repository at this point in the history
Allows user to define new colors using RGB values.
  • Loading branch information
mhw-at-yg committed Mar 11, 2021
1 parent c514131 commit ae2f208
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/AS11088/_Readme.txt
@@ -0,0 +1,4 @@
# Source: Jim Barry, Geonet forum
# Url: https://community.esri.com/t5/developers-questions/please-restore-arcscripts/
# Retrieved_by: Matt.Wilkie@yukon.ca
# Retrieved_date: 2021-03-11
1 change: 1 addition & 0 deletions data/AS11088/_item.csv
@@ -0,0 +1 @@
11088,Define RGB Color,ArcView GIS,Avenue,AS11088.zip,AS11088.zip,9-Apr-98,18-Mar-99,Public Domain,589,4876,,,This script allows you to define colors using RGB values instead of using the HSV model. The source is included in a text file.,No,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
37 changes: 37 additions & 0 deletions data/AS11088/definergb.txt
@@ -0,0 +1,37 @@
' *************************************************************************
' DefineRGB
'
' Allows user to define new colors using RGB values.
'
' This script prompts the user for RGB values and then creates a new
' color using these values. The color is then added to the color palette.
'
' Created: Mark Carniello, 24.1.1996
'
' *************************************************************************





mySymWin = av.GetSymbolWin
mySymWin.Open
mySymWin.SetPanel(#SYMBOLWIN_PANEL_COLOR)
myPalette = mySymWin.GetPalette
myPaletteList = myPalette.GetList(#PALETTE_LIST_COLOR)

MyStringValueList = MsgBox.MultiInput("Please enter RGB Values:","GBRMPA",{"red","green","blue"},{"255","255","255"})
if (MyStringValueList.Count = 0) then
exit
end
MyValueList = List.Make
MyValueList.Add(MyStringValueList.Get(0).AsNumber)
MyValueList.Add(MyStringValueList.Get(1).AsNumber)
MyValueList.Add(MyStringValueList.Get(2).AsNumber)
myColor = Color.Make
myColor.SetRGBList(MyValueList)

myPaletteList.Add(myColor)
mySymWin.RefreshPalette(#PALETTE_LIST_COLOR)


0 comments on commit ae2f208

Please sign in to comment.