Try this (untested):
function ColorToARGB(AColor: TColor): TARGBColor;
type
TColorRec = record r,g,b,a: byte; end;
TARGBColorRec = record a,r,g,b: byte; end;
begin
with TARGBColorRec(Result) do
begin
a := 0;
r := TColorRec(AColor).r;
g := TColorRec(AColor).g;
b := TColorRec(AColor).b;
end;
end;
Unit fppdf defines some standard colors:
Const
{ Some popular predefined colors. Channel format is: RRGGBB }
clBlack = $000000;
clWhite = $FFFFFF;
clBlue = $0000FF;
clGreen = $008000;
clRed = $FF0000;
clAqua = $00FFFF;
clMagenta = $FF00FF;
clYellow = $FFFF00;
clLtGray = $C0C0C0;
clMaroon = $800000;
clOlive = $808000;
clDkGray = $808080;
clTeal = $008080;
clNavy = $000080;
clPurple = $800080;
clLime = $00FF00;
clWaterMark = $F0F0F0;
As you can see, these constants have the same names as those in the Graphics unit. So, be careful, when using clXXXX constants and you are having both fppdf and graphics in the same unit. Ideally, fully-qualify these identifiers by prepending them with the unit name, e.g. Graphics.clRed vs. fppdf.clRed.
I am not sure about the "a" in the TARGBColor values. If it is the "alpha channel" (opacity) then a=0 would mean: fully transparent, and the clXXXX colors in the fppdf unit would not be visible. Maybe some special handling is needed to mask out and replace the "a" byte when transparency is needed. (I did not use fppdf so far, so, just guessing...)