Value changes specific to color

merge-requests/30/head
Bob Mottram 2021-12-05 19:56:14 +00:00
parent 3ed5e4ceee
commit 1bec325f3f
1 changed files with 6 additions and 6 deletions

View File

@ -231,14 +231,14 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str,
themeForm += ' <tbody>\n' themeForm += ' <tbody>\n'
for variableName, value in themeJson.items(): for variableName, value in themeJson.items():
if variableName.endswith('-color') or \
variableName.endswith('-text'):
# only use colors defined as hex # only use colors defined as hex
if not value.startswith('#'): if not value.startswith('#'):
if color_to_hex.get(value): if color_to_hex.get(value):
value = color_to_hex[value] value = color_to_hex[value]
else: else:
continue continue
if variableName.endswith('-color') or \
variableName.endswith('-text'):
variableNameStr = variableName.replace('-', ' ') variableNameStr = variableName.replace('-', ' ')
if variableNameStr.endswith(' color'): if variableNameStr.endswith(' color'):
variableNameStr = variableNameStr.replace(' color', '') variableNameStr = variableNameStr.replace(' color', '')