epub converter: hardcode colors for 9781284171242

This commit is contained in:
shirshasa
2021-06-02 14:33:28 +03:00
parent 1b94b870a7
commit a3b2343a7c

View File

@@ -57,6 +57,12 @@ def str2color_name(s: str):
return name
elif '#' in s:
if s in ['#996A95', '#D5C9D3', '#E9E2E8', '#70416F']:
return 'purple'
if s in ['#FFD472', '#F47B4D', '#FFFBEF', '#F47B4D']:
return 'olive'
if s in ['#B0DFD7', '#EFF8F6', '#5CC4B7']:
return 'teal2'
name = get_hex_color_name(s)
if (name == 'white') and (s.lower() not in ['#ffffff', '#fff']):
name = 'gray'