Skip to content

Commit

Permalink
Change colors as per wireviz#17 review
Browse files Browse the repository at this point in the history
  • Loading branch information
aakatz3 committed Jul 16, 2020
1 parent 9cc191c commit 7ab4971
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/wireviz/Harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def create_graph(self) -> Graph:
font = 'arial'
dot.attr('graph', rankdir='LR',
ranksep='2',
bgcolor='white',
bgcolor=wv_colors.default_bknd_color,
nodesep='0.33',
fontname=font)
dot.attr('node', shape='record',
Expand Down
27 changes: 20 additions & 7 deletions src/wireviz/wv_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Convention: Color names should be 2 letters long, to allow for multicolored wires

shield_color = '#aaaaaa:#84878c' # SN
shield_color = '#aaaaaa' # Tinned wire

_color_hex = {
'BK': '#000000',
Expand All @@ -43,13 +43,17 @@
'TQ': '#00ffff',
'BU': '#0066ff',
'VT': '#8000ff',
'BN': '#a52a2a',
'BN': '#895956',
'SL': '#708090',
# Faux-copper look, for bare CU wire
'CU': '#d6775e:#895956',
'CU': '#d6775e',
# Silvery look for tinned bare wire
'SN': '#aaaaaa:#84878c',
# Yellow-green PE wire
'SN': '#aaaaaa',
# Darker silver for silvered wire
'AG': '#84878c',
# Golden color for gold
'AU': '#ffcf80',
# Yellow-green PE wire (matching actual wire colors, should prevent confusion with a yellow-green dual color wire
'PE': '#54aa85:#f7f854:#54aa85',
}

Expand All @@ -69,6 +73,9 @@
'SL': 'slate',
'CU': 'bare copper',
'SN': 'tinned copper',
'AG': 'silver wire',
'AU': 'gold wire',
'PE': 'earth'
}

# TODO Help wanted: can someone check the german translation?
Expand All @@ -90,9 +97,15 @@
# Slate --> Schieferfarbe --> SI ??
'SL': 'si',
# Copper
'CU': 'ku',
'CU': 'cu',
# Tinned
'SN': 'si'
'SN': 'sn',
# Silver
'AG': 'ag',
# Gold
'AU': 'au',
# Earth
'PE': 'pe'
}


Expand Down

0 comments on commit 7ab4971

Please sign in to comment.