diff --git a/src/wireviz/Harness.py b/src/wireviz/Harness.py index e701425..a29ce35 100644 --- a/src/wireviz/Harness.py +++ b/src/wireviz/Harness.py @@ -8,7 +8,7 @@ from wireviz.wv_colors import get_color_hex from wireviz.wv_helper import awg_equiv, mm2_equiv, tuplelist2tsv, \ nested_html_table, flatten2d, index_if_list, html_line_breaks, \ graphviz_line_breaks, remove_line_breaks, open_file_read, open_file_write, \ - html_image, html_caption, manufacturer_info_field + html_colorbar, html_image, html_caption, manufacturer_info_field from collections import Counter from typing import List from pathlib import Path @@ -96,17 +96,13 @@ class Harness: [html_line_breaks(connector.type), html_line_breaks(connector.subtype), f'{connector.pincount}-pin' if connector.show_pincount else None, - connector.color, '' if connector.color else None], + connector.color, html_colorbar(connector.color)], '' if connector.style != 'simple' else None, [html_image(connector.image)], [html_caption(connector.image)], [html_line_breaks(connector.notes)]] html.extend(nested_html_table(rows)) - if connector.color: # add color bar next to color info, if present - colorbar = f' bgcolor="{wv_colors.translate_color(connector.color, "HEX")}" width="4">' # leave out '
| tag - html = [row.replace('> | ', colorbar) for row in html] - wirehtml = [] wirehtml.append('