We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8fd806 commit 8643394Copy full SHA for 8643394
lambeq/backend/drawing/drawing.py
@@ -453,9 +453,9 @@ def _get_box_color(box: grammar.Diagrammable,
453
if isinstance(box, grammar.Frame) and hasattr(box, 'name'):
454
frame_attr = getattr(box, f'frame_{coloring_mode}')
455
if coloring_mode == ColoringMode.TYPE:
456
- frame_attr += (len(FRAME_COLORS) // 7) * box.frame_order
+ frame_attr += (len(FRAME_COLORS) // 7) * (box.frame_order - 1)
457
458
- color = FRAME_COLORS[frame_attr % len(FRAME_COLORS)]
+ color = FRAME_COLORS[(frame_attr - 1) % len(FRAME_COLORS)]
459
460
return color
461
0 commit comments