Skip to content

Commit 55307f7

Browse files
committed
fix(verify): pin mermaid pie slice colors to green/amber/red
Mermaid colors slices pie1/pie2/pie3 by declaration order; default palette showed Green=black, Yellow=red, Red=blue. Set themeVariables to match labels. Refs #1
1 parent 40d3a3d commit 55307f7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/verify/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,13 @@ def _print_markdown(hist, scored, hard_flags) -> None:
198198
gtot = sum(totals.values()) or 1
199199
print(f"**{scored} record(s) scored.**\n")
200200

201-
# Overall distribution as a Mermaid pie (rendered by GitHub).
201+
# Overall distribution as a Mermaid pie (rendered by GitHub). Mermaid colors
202+
# slices pie1/pie2/pie3 in declaration order, so pin them to green/amber/red
203+
# to match the labels (default palette would show black/red/blue).
202204
print("```mermaid")
205+
print('%%{init: {"theme":"base","themeVariables":'
206+
'{"pie1":"#3fb950","pie2":"#d29922","pie3":"#f85149",'
207+
'"pieStrokeWidth":"0px","pieOpacity":"1"}}}%%')
203208
print("pie showData")
204209
print(' title Verification bands — all records')
205210
print(f' "Green" : {totals["green"]}')

0 commit comments

Comments
 (0)