Thanks Dan

The answer is actually straightforward - it came to me when I woke this 
morning ...

loColor = _Screen.System.Drawing.Color.Indigo
lnColor = loColor.ToRGB()

Paul Newton

n 30/09/2010 02:29, Dan Covill wrote:
> This one works:
>
> procedure ColorString
>      lparameters Rgb&&  integer RGB value
>      *-- Returns string "rgb(rrr,ggg,bbb)"
>
> local rr,gg,bb
> rr = Mod(Rgb, 256)
> gg = Mod(Int(Rgb / 256), 256)
> bb = Int(Rgb / 65532)
> *? rr, gg, bb
> Result =  "rgb("+Str(rr,3)+','+Str(gg,3)+','+Str(bb,3)+')'
> return result
>
> Dan Covill
>
> On 9/29/2010 2:22 PM, Paul Newton wrote:
>>     Thanks Eurico but I am looking for a more generic solution.  For
>> example if I create a color object like this ...
>>
>> n =<some arbitrary value>
>>
>> loColor = _Screen.System.Drawing .Color.FromRGB(n)
>>
>> Or
>>
>> loColor = _Screen.System.Drawing .Color.Red/Blue/Indigo etc etc
>>
>> I need to be able to get the RGB value (n) of loColor
>>
>> Paul
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to