If you want to convert the second to the first you have to swap the TColor (32 bit DWord)
Swap function not suitable for this task. It swaps first 2 bytes and last 2 bytes, but I need to swap only second and fourth bytes (Blue and Red values):
Constant | TColor
---------------------
0RGB | 0BGR
$00DC143C | $003C14DC
^^--^^
I made this with code:
function FixColorConstant(AColor: TColorRec): TColor;
begin
{$if defined(FPC_FULLVERSION) and (FPC_FULLVERSION <= 030202)}
Result := RGBToColor(AColor.B, AColor.G, AColor.R);
{$ELSE}
// ToDo: Check if it fixed in modern version
Result := AColor;
{$ENDIF}
end;