Quote:
>-----Original Message-----
>Hi Alfred,
>In the windows color picker, if you select Define Custom
Colors you can see
>RGB as well as HSL values.
>HTH
>Steve C
>> I need to find out how to extract the Red, Green and
Blue
>> components of a Windows color code.
>> I can create the code with the RGB system.
>> Example: RGB(255,255,0) is 65535 (Yellow).
>> How can I take the code 65535 and extract the Red, Green
>> and Blue componets?
>> Thank You,
>> Alfred M. Blanco
>Steve: Thank you for your input.
In the time after I posted the message I figured out how
the windows color code is created by playing with it.
It is an exponential progression of powers of 256.
WindowsCode = Red*256^0 + Green*256^1 + Blue*256^2.
With this information I went about to what I call making
the chicken from the soup.
ChickenFromSoup = Divide the number by 256^2 Take the
integer part and that is your Blue component. Take the
fractional part of that number and multiply it by 256 and
again take the integer part of the number and that is your
Green component. The Red component is what is left after
you subtract the Blue and the Green components from the
original windows color code.
If you want to see the code send me an email and I will
send it to you if you want.
Thank you,
Alfred M. Blanco
Quote:
>.