DEFINE CLASS colorreg AS registry FUNCTION GetRGB LPARAMETERS cItem, nR, nG, nB && pass colors by reference * eg eNum= o.GetRGB("Hilight", @m.nR, @m.nG, @m.nB) LOCAL cRGB, nRetVal cRGB= "" nRetVal= THIS.GetRegKey(m.cItem, @cRGB, "Control Panel\Colors", HKEY_CURRENT_USER) nR= INT(VAL(m.cRGB)) nG= INT(VAL(SUBSTR(m.cRGB, AT(" ", m.cRGB)+1))) nB= INT(VAL(SUBSTR(m.cRGB, RAT(" ", m.cRGB)+1))) RETURN m.nRetVal ENDFUNC FUNCTION ColorValue LPARAMETER cItem * eg myColor= o.ColorValue("Hilight") LOCAL nR, nG, nB IF THIS.GetRGB(m.cItem, @m.nR, @m.nG, @m.nB) = ERROR_SUCCESS RETURN RGB(m.nR, m.nG, m.nB) ELSE RETURN 0 && black ENDIF ENDFUNC ENDDEFINEYou can then do: