Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting HTML color to number
Message
From
06/01/1998 18:35:43
 
 
To
06/01/1998 17:15:39
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00069534
Message ID:
00069937
Views:
44
>>Here's what I use. You can pass it an RGB color value (ie RGB(192,192,192)) or
>>the numbers you're using (I think those appear to be RGB values).
>
>In my case, I would like to pass CCCCCC. This is why I mentioned this function may not be what I am looking for.
>
>I also don't understand why there is negative numbers in that sample I took from Sheridan grid control. One of the parameters is going like this PARAM NAME="BackColor" VALUE="-2147483643".

The negative number comes from the internal representation of the signed integer values. The sign is the left most bit, so if you want to have this bit set on 1, you use a negative value. The -2147483643 decimal value is 80000005 in hex.

Since the color representation is usually on 24 bits, the first 8 bits (from left) are not used. So, I don't really get why they use that value. IMO, that value should be the same as 5 for color representation. But maybe I don't understand something.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform