diff --git a/src/wireviz.py b/src/wireviz.py index eb89682..230046c 100755 --- a/src/wireviz.py +++ b/src/wireviz.py @@ -142,8 +142,9 @@ class Harness: for bla in p: html = html + '{}'.format(bla) html = html + '' - 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)) + bgcolors = ('#000000:' + wv_colors.translate_color(x, 'hex') + ':#000000').split(':') + for j, bgcolor in enumerate(bgcolors): + html = html + ''.format(colspan=len(p), bgcolor=bgcolor if bgcolor != '' else '#ffffff', port=' port="w{}"'.format(i) if j == len(bgcolors)//2 else '') if c.shield: p = ['', 'Shield', '']