Tone down the patch panel shape

Dark navy body + high-contrast port ticks made patch panels the single
boldest thing on the page -- more visually dominant than even the
distribution switches, backwards for the least important device type in
the diagram. Switched to a pale warm-stone fill/stroke (distinct hue from
the switches' cool blue-grays, so it doesn't just read as 'a paler gray
box' next to the field-switch/spare swatches), a hairline seam instead of
a solid strip, and outline-only port ticks instead of filled dark ones.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NM3nivbufxEWiKKmatEtEe
This commit is contained in:
dcstephenson
2026-09-15 14:10:22 -05:00
parent 2a7528f8d8
commit 4222da4a9b
3 changed files with 16 additions and 14 deletions
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

+15 -13
View File
@@ -185,7 +185,7 @@ STYLE = {
"spare": dict(fill="#F1F1F2", stroke="#9AA0AA", font="#5B6478", dashed=1, bold=0), "spare": dict(fill="#F1F1F2", stroke="#9AA0AA", font="#5B6478", dashed=1, bold=0),
"decom": dict(fill="#FBE6E2", stroke="#C04B34", font="#8A3423", dashed=1, bold=0), "decom": dict(fill="#FBE6E2", stroke="#C04B34", font="#8A3423", dashed=1, bold=0),
"planned": dict(fill="#FDF1CF", stroke="#B8862C", font="#7A5C00", dashed=1, bold=0), "planned": dict(fill="#FDF1CF", stroke="#B8862C", font="#7A5C00", dashed=1, bold=0),
"panel": dict(fill="#3A4457", stroke="#242C38", font="#FFFFFF", dashed=0, bold=0), "panel": dict(fill="#F1EDE6", stroke="#A69C89", font="#6B6154", dashed=0, bold=0),
} }
def style_for(dev): def style_for(dev):
@@ -248,26 +248,28 @@ add_cell(
# ---------------- node shapes ---------------- # ---------------- node shapes ----------------
# Switches: a real network-switch icon, hostname caption below it. # Switches: a real network-switch icon, hostname caption below it.
# Patch panels: a small rack-style unit -- dark body, a lighter header strip, # Patch panels: understated -- pale body, a thin hairline where a rack unit's
# and a row of port ticks along the bottom -- built from cells parented to # seam would be, and a row of faint port outlines. Reads as "passive
# the panel's own body cell, so the whole unit moves together when dragged. # hardware, not the point of this diagram" rather than competing with the
# switches for attention. Built from cells parented to the panel's own body
# cell, so the whole unit moves together when dragged.
def panel_shape(did, x, y, w, h, name, st): def panel_shape(did, x, y, w, h, name, st):
body_id = f"n{did}" body_id = f"n{did}"
vertex(body_id, name, x, y, w, h, vertex(body_id, name, x, y, w, h,
f'rounded=1;arcSize=10;whiteSpace=wrap;html=1;fillColor={st["fill"]};strokeColor={st["stroke"]};' f'rounded=1;arcSize=6;whiteSpace=wrap;html=1;fillColor={st["fill"]};strokeColor={st["stroke"]};'
f'fontColor={st["font"]};fontSize=9;verticalAlign=bottom;spacingBottom=5;') f'fontColor={st["font"]};fontSize=9;verticalAlign=bottom;spacingBottom=5;')
# header strip (lighter steel), relative to the body # hairline seam, relative to the body
vertex(f"{body_id}-strip", "", 5, 4, w - 10, 5, vertex(f"{body_id}-strip", "", 5, 6, w - 10, 1,
'rounded=1;arcSize=40;fillColor=#8C97A6;strokeColor=none;', parent=body_id) f'rounded=0;fillColor={st["stroke"]};strokeColor=none;', parent=body_id)
# port ticks along the top-middle, evenly spaced # faint port outlines along the top-middle, evenly spaced
n_ticks = 6 n_ticks = 6
tick_w, tick_h = 10, 7 tick_w, tick_h = 9, 6
usable = w - 16 usable = w - 16
gap = usable / n_ticks gap = usable / n_ticks
for k in range(n_ticks): for k in range(n_ticks):
tx = 8 + gap * k + (gap - tick_w) / 2 tx = 8 + gap * k + (gap - tick_w) / 2
vertex(f"{body_id}-t{k}", "", tx, 15, tick_w, tick_h, vertex(f"{body_id}-t{k}", "", tx, 14, tick_w, tick_h,
'rounded=0;fillColor=#2A313D;strokeColor=#5B6577;strokeWidth=0.75;', parent=body_id) f'rounded=0;fillColor=none;strokeColor={st["stroke"]};strokeWidth=0.75;', parent=body_id)
for did, dev in devs.items(): for did, dev in devs.items():
if did not in pos: if did not in pos:
@@ -301,7 +303,7 @@ for idx, e in enumerate(edges):
legend_items = [ legend_items = [
("#2F5FAD", "#173D6E", "Distribution switch"), ("#2F5FAD", "#173D6E", "Distribution switch"),
("#F3F5FA", "#7C8AA6", "Field switch"), ("#F3F5FA", "#7C8AA6", "Field switch"),
("#3A4457", "#242C38", "Patch panel / splice module"), ("#F1EDE6", "#A69C89", "Patch panel / splice module"),
("#F1F1F2", "#9AA0AA", "Spare / decommissioned / planned"), ("#F1F1F2", "#9AA0AA", "Spare / decommissioned / planned"),
] ]
lx = MARGIN lx = MARGIN