diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py
index 80d250a..2792c2c 100644
--- a/src/wireviz/Harness.py
+++ b/src/wireviz/Harness.py
@@ -67,7 +67,7 @@ class Harness:
font = 'arial'
dot.attr('graph', rankdir='LR',
ranksep='2',
- bgcolor='white',
+ bgcolor=wv_colors.COLOR_BACKGROUND,
nodesep='0.33',
fontname=font)
dot.attr('node', shape='record',
@@ -302,7 +302,7 @@ class Harness:
# HTML output
with open_file_write(f'{filename}.html') as file:
file.write('\n')
- file.write('
')
+ file.write(f'')
file.write('Diagram
')
with open_file_read(f'{filename}.svg') as svg:
diff --git a/src/wireviz/wv_colors.py b/src/wireviz/wv_colors.py
index 9e49d42..e7b7c6d 100644
--- a/src/wireviz/wv_colors.py
+++ b/src/wireviz/wv_colors.py
@@ -98,12 +98,13 @@ _color_ger = {
}
-color_default = '#ffffff'
+COLOR_DEFAULT = '#ffffff'
+COLOR_BACKGROUND = '#ffffff'
def get_color_hex(input, pad=False):
if input is None or input == '':
- return [color_default]
+ return [COLOR_DEFAULT]
if len(input) == 4: # give wires with EXACTLY 2 colors that striped/banded look
input = input + input[:2]
# hacky style fix: give single color wires a triple-up so that wires are the same size
@@ -113,7 +114,7 @@ def get_color_hex(input, pad=False):
output = [_color_hex[input[i:i + 2]] for i in range(0, len(input), 2)]
except KeyError:
print("Unknown color specified")
- output = [color_default]
+ output = [COLOR_DEFAULT]
return output