Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an RGB color group using a Color Picker dialog
Message
 
To
15/01/2001 05:43:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00463695
Message ID:
00463712
Views:
16
*------------------------------------------------
* FUNCTION Col2RGB(tnColor)
*------------------------------------------------
* USE: Col2RGB(1547)
* RETURN: Caracter -> "RGB(nR, nG, nB)" 
*------------------------------------------------
FUNCTION Col2RGB(tnColor)
  LOCAL lcRGB, ln 
  lcRGB = "RGB(" 
  FOR ln = 1 TO 3
    lcRGB = lcRGB+TRAN(tnColor%256,"999")+IIF(ln=3, "", ",")
    tnColor = INT(tnColor/256)
  ENDFOR
  lcRGB = lcRGB+")"
  RETURN lcRGB
ENDFUNC
*-------------------------------------------------
>I want to be able to return an RGB color group by using some sort of color picker.
>
>GetColor() only returns the color number.
>
>Is it possible to convert the color number returned by GetColor to an RGB pair/group.
>
>Thanks
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform