? rgbToColor("212,208,200") function rgbToColor lparameters lcRgb local laColors dimension laColors[3] if aLines(laColors, strtran(lcRGB, ",", chr(13)+chr(10))) <> 3 error "Invalid RGB code" else return rgb(val(laColors[1]), val(laColors[2]), val(laColors[3])) endif endproc>I need to do the reverse of this:
>? Color2RGB(GetColor()) > > >function Color2RGB >lparameters RGBcolor >* Color = 0x00bbggrr >return "rgb("+; > ltrim(str(bitand(RGBColor,0x000000ff)))+","+ ; > ltrim(str(bitrshift(bitand(RGBColor,0x0000ff00),8)))+","+ ; > ltrim(str(bitrshift(bitand(RGBColor,0x00ff0000),16)))+")" > >>If I know the color is 212,208,200 on a form I need to return this color as it as it is stored in _screen.backcolor, etc. I'm braindead this afternoon, anyone willing to share a little function to do this?