Skip to main content

The Merge Line Problem

In a Git graph visualization, branches are represented as colored lines. When two branches merge, what color should the merge line be?

sRGB vs OKLAB for Merge Lines

Non-Opposite Colors: Where OKLAB Shines

Most branch combinations are NOT opposite colors, and this is where OKLAB really demonstrates its value.

Branch Color Distribution with Golden Angle

For maximum distinction between branches, use the full Golden Angle (137.5 degrees).

Merge Scenarios

Feature into Main

Hotfix into Main

Merge Commit vs Merge Line

CSS Implementation

Hierarchical Coloring for Many Branches

Branch Status Colors

THE CENTER

Merge Lines as Relationship Indicators

In a Git graph, merge lines are the visual representation of code integration. The color of a merge line should communicate “this brings together branch A and branch B.” OKLAB interpolation achieves this by producing a clean, predictable intermediate color.
When two branches merge, their colors should blend - not clash. OKLAB interpolation ensures that the merge line visually represents both parents without becoming muddy or confusing.

Dynamic Generation

Runtime gradient generation with OKLCH/OKLAB