fix colors in converter

This commit is contained in:
shirshasa
2020-10-22 14:50:39 +03:00
parent adb9b17500
commit cadb5a6e56
2 changed files with 18 additions and 2 deletions

View File

@@ -91,10 +91,10 @@ class HTMLPreprocessor:
if style:
style = self.convert_font_pt_to_px(style)
if style != "":
if color and color != '#000000':
if color and color in LawCartaConfig.COLORS:
style += f'; color: {color};'
font.attrs["style"] = style
elif color and color != '#000000':
elif color and color in LawCartaConfig.COLORS:
font.attrs["style"] = f'color: {color};'
if face is not None: