Skip to content

fix: improve branch colors in the commit graph - #2846

Open
tib8 wants to merge 2 commits into
sourcegit-scm:developfrom
tib8:improved-tree-lane-coloring
Open

tib8 wants to merge 2 commits into
sourcegit-scm:developfrom
tib8:improved-tree-lane-coloring

Conversation

@tib8

@tib8 tib8 commented Oct 30, 2026 •

Copy link
Copy Markdown

Use Paul Tol's six chromatic Bright colours for both the default commit graph and repository bookmarks: blue (#4477AA), cyan (#66CCEE), green (#228833), yellow (#CCBB44), red (#EE6677), and purple (#AA3377). Grey remains reserved for dimmed history.

Change colour at named branch boundaries and use the repository bookmark colour for the checked-out branch. Prefer perceptually distinct neighbouring segments under normal vision and simulations of protanopia, deuteranopia, and tritanopia. Preserve graph layout, shared commit dots, highlighting, custom graph palettes, and line thickness.

Migrate saved legacy bookmark indices to the nearest Tol colour using normal-vision OKLab distance. This covers the original seven colours and the expanded palette, nested repository groups in preferences, and unmanaged sourcegit.node metadata. New choices use distinct persisted IDs (101-106), so saving and reopening cannot convert a migrated choice a second time.

The neutral bookmark follows the theme foreground. Coloured bookmark icons keep their palette hue and receive a theme-aware outline for visibility on light and dark backgrounds. Bookmark edits refresh open graphs and branch badges immediately. Bookmark dialog rows size to their content.

Validation:

  • Build succeeds without warnings or errors.
  • 90 commit-graph regression checks pass.
  • 399 bookmark-colour checks pass, including legacy migration, generated JSON serialization, unmanaged metadata file round trips, new-ID round trips, rendered light/dark icons, dialog layouts, palettes, and highlighting modes.
  • dotnet format --verify-no-changes src/SourceGit.csproj --no-restore passes.

@tib8 tib8 changed the title fix: distinguish stacked branches in commit graph colors fix: improve branch colors in the commit graph Oct 30, 2026
@tib8
tib8 force-pushed the improved-tree-lane-coloring branch 2 times, most recently from 4b44ff5 to a40f8b3 Compare October 30, 2026 19:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant