epub converter: fix bg-color

This commit is contained in:
shirshasa
2021-06-28 13:56:23 +03:00
parent f3fd1a5651
commit 45c1931ab3
3 changed files with 40 additions and 18 deletions

View File

@@ -80,7 +80,7 @@ def str2closest_html_color_name(s: str):
def str2hex(s: str):
if '#' in s:
return s
return s.lower()
if ('rgb' in s) and ('%' in s):
match = re.search(r'rgba*\(((\d+)%, *(\d+)%, *(\d+)%(, \d\.\d+)*)\)', s)