in playground/process_analysis/status_transition_graph_stats_plot.py [0:0]
def _color_for_edge(edge_count: int, min_count: int, max_count: int) -> str:
base_r, base_g, base_b = (106, 29, 87) # dark base color
factor = (
0 if min_count == max_count else (1 - (edge_count - min_count) / (max_count - min_count)) * 0.8
) # 0.8 is the max brightning factor
edge_r = base_r + (255 - base_r) * factor
edge_g = base_g + (255 - base_g) * factor
edge_b = base_b + (255 - base_b) * factor
return f"rgb({edge_r},{edge_g},{edge_b})"