?color2rgb(GetColor())
>>Here's my color2rgb function. It's a little "overkill" for your specific need, since it also can return only one color component, like ?color2rgb(16711808,'R') which will only give the red value. I need this functionality in some programs, so I created a generic function.>>Function color2rgb >> Lparameters lnColor,lcColor >> Local lnRed,lnGreen,lnBlue,lxReturn >> lnRed = Mod(lnColor, 256) >> lnGreen = Mod(Bitrshift(lnColor, 8), 256) >> lnBlue = Mod(Bitrshift(lnColor, 16), 256) >> Do Case >> Case Pcount()=1 >> lxReturn=n2c(lnRed)+','+n2c(lnGreen)+','+n2c(lnBlue) >> Case Upper(lcColor)='R' >> lxReturn=lnRed >> Case Upper(lcColor)='G' >> lxReturn=lnGreen >> Case Upper(lcColor)='B' >> lxReturn=lnBlue >> Otherwise >> lxReturn=-1 >> Endcase >>Return lxReturn>>NB! Note that you can use the (numeric) return value from getcolor() almost anywhere, so there's really no reason to convert to RGB.