Please paste this function right at the start of implementation in
unit WPIOHTML and it should work:
function WPColorToString(Color: TColor): string;
var
rgb : Cardinal;
begin
if Color = clNone then Result:='transparent'
else
begin
rgb := ColorToRGB(Color);
Result := Format('#%.2x%.2x%.2x',
[GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)]);
end;
end;
When saving TWRichText content to HTML, any text formatted as red or yellow is being converted to blue. For example, using MyText.SaveToFile('c:\myText.html', False, 'HTML'); produces incorrect colours. Has anything changed in recent versions? We upgraded to v9.4.2.0 recently, and earlier versions did not show this behaviour.