diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index ab98d93d0a..f34d5a1f12 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -842,7 +842,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons if (!attr.GetFontFaceName().IsEmpty()) str << wxT(" face=\"") << attr.GetFontFaceName() << wxT("\""); - if (attr.GetTextColour().IsOk()) + if (attr.GetTextColour().IsOk() && attr.GetTextColour() != attr.GetBackgroundColour() && !(!attr.HasBackgroundColour() && attr.GetTextColour() == *wxWHITE)) str << wxT(" color=\"#") << ColourToHexString(attr.GetTextColour()) << wxT("\""); if (attr.GetBackgroundColour().Ok())