TreeView Xtra TREEVIEW XTRA HELP: COLOR  
 

All TreeView methods that require color specifications use RGB values, and expect red, green and blue values in the range of 0 to 65535. If you are more comfortable with 0 - 255 values, the way Director 7 handles RGB, you can convert those values to TreeView values like so:

 

on rgbConvert colorList

-- Expects a list like this [r,g,b] where

-- rgb are the color values in scale 0 - 255

-- Returns a list in the same format with

-- color values in scale 0 - 65535

--

-- EX: put rgbConvert( [255,150,0] )

-- [65535, 38550, 0]

--

newList = []

repeat with x = 1 to 3

convertedColor = (65535/255) * getAt(colorList,x)

add newList,convertedColor

end repeat

return newList

end