Hi all,
I''m working alot with RGB and ARGB colors and
need to make an app to convert RGB color codes
to ARGB.
Please any help would be appriciated.
This is what I tried:byte Alpha;
byte Red;
byte Green;
byte Blue;
int RGB;
....
private long ARGB()
{
long functionReturnValue = 0;
if (Alpha > 127)
{
functionReturnValue = ((Alpha - 128) * 0x1000000 | 0x80000000) | Red | (Green * 0x100L) | (Blue * 0x10000);
}
else
{
functionReturnValue = (Alpha * 0x1000000) | Red | (Green * 0x100L) | (Blue * 0x10000);
}
return functionReturnValue;
RGB = Alpha & Red & Green & Blue;
}
解决方案please read this[^].