From b253d0a1d7683d2032dac9e7598a0e9d64c36e0e Mon Sep 17 00:00:00 2001 From: KV Date: Thu, 25 Jun 2020 19:57:25 +0200 Subject: [PATCH] Reverse colors to match the curved wires when more than 2 colors --- src/wireviz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wireviz.py b/src/wireviz.py index f328192..5557ddd 100755 --- a/src/wireviz.py +++ b/src/wireviz.py @@ -144,7 +144,7 @@ class Harness: html = html + '' bgcolors = ('#000000:' + wv_colors.translate_color(x, 'hex') +':#000000').split(':') html = html + ''.format(colspan=len(p), port ='w{}'.format(i), height = '{}'.format(2*len(bgcolors))) - for j, bgcolor in enumerate(bgcolors): + for j, bgcolor in enumerate(bgcolors[::-1]): # Reverse to match the curved wires when more than 2 colors html = html + ''.format(colspan=len(p), bgcolor=bgcolor if bgcolor != '' else '#ffffff') html = html + '
'