I found a code snip by Gile (Here on AUGI and at theswamp.org) that converts Hex to Long Integers.
I modified his code snip to my variable naming standard and built a function to convert your layer names to RGB values with hues.
It is a good place to start.
P=
Code:
; Function to convert Layer name to RGB color and hue.
; Syntax: (ColorStringConvert "color#5d2924ff") returns '((93 41 36) 255)
(defun ColorStringConvert (strColorCode)
(list
(list
(HexadecimalToInteger (substr strColorCode 7 2))
(HexadecimalToInteger (substr strColorCode 9 2))
(HexadecimalToInteger (substr strColorCode 11 2))
)
(HexadecimalToInteger (substr strColorCode 13 2))
)
)
; Funtion to convert Hexadecimal to Long Integer
; Modified code originally posted to AUGI forums by Gile.
; See: http://forums.augi.com/showthread.php?90683-String-to-Hexa
(defun HexadecimalToInteger (strHexadecimal / intInteger intAscii)
(setq intInteger 0)
(foreach intAscii (vl-string->list (strcase strHexadecimal))
(setq intInteger (+ (lsh intInteger 4)
(- intAscii
(if (<= intAscii 57) 48 55)
)
)
)
)
)