diff --git a/src/wireviz.py b/src/wireviz.py
index afe825d..eb89682 100755
--- a/src/wireviz.py
+++ b/src/wireviz.py
@@ -33,9 +33,10 @@ class Harness:
dot.body.append('// Graph generated by WireViz')
dot.body.append('// https://github.com/formatc1702/WireViz')
font = 'arial'
+ bgcolor = wv_colors.default_bknd_color
dot.attr('graph', rankdir='LR',
ranksep='2',
- bgcolor='white',
+ bgcolor=bgcolor,
nodesep='0.33',
fontname=font)
dot.attr('node', shape='record',
@@ -141,7 +142,7 @@ class Harness:
for bla in p:
html = html + '
{} | '.format(bla)
html = html + ''
- bgcolor = wv_colors.translate_color(x, 'hex')
+ bgcolor = ":".join(wv_colors.translate_color(x, 'hex').split(':')[:2])
html = html + ' |
'.format(colspan=len(p), bgcolor=bgcolor if bgcolor != '' else '#ffffff', port='w{}'.format(i))
if c.shield:
@@ -168,10 +169,10 @@ class Harness:
for x in c.connections:
if isinstance(x.via_port, int): # check if it's an actual wire and not a shield
search_color = c.colors[x.via_port-1]
- if search_color in wv_colors.color_hex:
- dot.attr('edge',color='#000000:{wire_color}:#000000'.format(wire_color=wv_colors.color_hex[search_color]))
- else: # color name not found
- dot.attr('edge',color='#000000:#ffffff:#000000')
+ # if search_color in wv_colors.color_hex:
+ dot.attr('edge',color='#000000:{wire_color}:#000000'.format(wire_color=wv_colors.get_color_hex(search_color)))
+ # else: # color name not found
+ # dot.attr('edge',color='#000000:#ffffff:#000000')
else: # it's a shield connection
dot.attr('edge',color='#000000')
@@ -230,6 +231,7 @@ class Harness:
file.write('