I am trying to use the MakeColor
method in the GDIPAPI unit but the conversion from int
to byte
is not returning me the correct value.
Example
var
argbStr: string;
A, R, G, B: Byte;
begin
argbStr := 'ffffcc88';
A := StrToInt('$' + Copy(AValue, 1, 2));
R := StrToInt('$' + Copy(AValue, 3, 2));
G := StrToInt('$' + Copy(AValue, 5, 2));
B := StrToInt('$' + Copy(AValue, 7, 2));
Result := MakeColor(A, R, G, B);
end;
What am I doing wrong?