Ok, I've got this piece of code to convert a color value to HTML coding (it's Delphi code, but it's fairly easy to understand for any VB coder):
The only differences are that in VB $ = &H and IntToHex() is Hex()...Code:iRed := Color and $FF; iGreen := (Color and $FF00) div 256; iBlue := (Color and $FF0000) div 65536; Result := '#' + IntToHex(iRed, 2) + IntToHex(iGreen, 2) + IntToHex(iBlue, 2);
Ok, now that works perfectly, but my problem is, I want to reverse it. I've searched half the internet, but couldn't find it. Does anyone know how it works? The code doesn't have to be Delphi code, it can just be VB code...
Thanks!




Reply With Quote