I have this value: -16744448;
And this value is this color:
And now, I need to know how to change any value in hex like
'#01ff00', '#7fff82', '#c1ffc0', '#16F6F5','#81FFFC','#BFFFFF'
to int32 (is necessary)
function toColor(num) {
num >>>= 0;
var b = num & 0xFF,
g = (num & 0xFF00) >>> 8,
r = (num & 0xFF0000) >>> 16,
a = ( (num & 0xFF000000) >>> 24 ) / 255 ;
return "rgba(" + [r, g, b, a].join(",") + ")";
}
I used this formula, but I don't know how to apply reverse engineering.
EDIT:
I have this value: -16744448 in the database, with the formula i have this value for the color: '#008000', i need to convert this color again in -16744448.
When i used the formula mentioned in the comments i got: 32768
This value is from VB.net, this function: Color.FromArgb