Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions FastReport.Base/Export/ExportUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,12 @@ internal static string GetExcelFormatSpecifier(FormatBase format, bool useLocale

internal static string HTMLColor(Color color)
{
return ColorTranslator.ToHtml(color);
}

internal static string HTMLColorCode(Color color)
{
return String.Join(String.Empty, new String[] {
"#",
color.R.ToString("X2"),
color.G.ToString("X2"),
color.B.ToString("X2")
});
if (color.A < 255)
{
string alphaValue = (color.A / 255.0).ToString("0.00", INVARIANT_CULTURE);
return $"rgba({color.R}, {color.G}, {color.B}, {alphaValue})";
}
return $"rgb({color.R}, {color.G}, {color.B})";
}

internal static string ByteToHex(byte Byte)
Expand Down