
These numbers are stored in the Database. They origionate from Delphi code. Although I assume they follow some kind of standard. I have tried Color.FromArgb(255);
But i know for a fact that the first is RED (in the delphi side), where as in ASP.NET it thinks its blue Color [A=0, R=0, G=0, B=255]
I want these numbers into Hexidecimal anyway. I.e. #000000 , #FFFF99 etc etc
Anyone know how to conver these Integers (see DB Picture) to Hexidecimal.
Delphi colors (
TColor) areXXBBGGRRwhen not from a palette or a special color.See this article for more detail on the format (And other special cases). The article pointed by Christian.K also contains some details on the special cases.
Standard colors
To convert to a standard color you should use something like :
To convert to hex, :
System colors
For system colors (negative values in your database), they are simply the windows constants masked by
0x80000000.Thanks to David Heffernan for the info.
Sample code