Skip to content

Improve diff highlight contrast in Eclipse dark theme - #2995

Draft
tobiasmelcher wants to merge 2 commits into
eclipse-platform:masterfrom
tobiasmelcher:d031119/improve-diff-colors-dark-theme
Draft

tobiasmelcher wants to merge 2 commits into
eclipse-platform:masterfrom
tobiasmelcher:d031119/improve-diff-colors-dark-theme

Conversation

@tobiasmelcher

@tobiasmelcher tobiasmelcher commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2993.

Diff highlights are hard to distinguish from the editor background in the dark theme. This change uses stronger dark-theme blends shared by two-way Compare and Unified Diff, and aligns the annotation colors with those blends. The light-theme palette and configurable base colors are preserved.

This remains a draft pending expert review of theme detection and the changed appearance of colors that users have customized for the old dark-theme blends.

Developed with the help of Claude Code (Anthropic) and Codex.

@tobiasmelcher

Copy link
Copy Markdown
Contributor Author

One concern I'd like to raise for review: this change may break user-specific color configurations.

Users can configure ADDITION_COLOR and DELETION_COLOR via Preferences → Colors and Fonts. If they have tuned those colors specifically to look good in dark theme with the old scale factors (0.9/0.8), the new factors (0.79/0.5) will produce noticeably different results — potentially making their carefully chosen colors look wrong.

I have already seen users who were unhappy with the default colors and had configured their own. Are we allowed to break their configuration with this change? Should we add a migration note, or is there a way to preserve the user experience for those who have already customized their colors?

Happy to hear the community's view on this before merging.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    51 files  ±  0      51 suites  ±0   35m 4s ⏱️ - 22m 17s
 4 834 tests +358   4 809 ✅ +355   22 💤 ±0  3 ❌ +3 
12 393 runs  +876  12 231 ✅ +868  153 💤  - 1  9 ❌ +9 

For more details on these failures, see this check.

Results for commit 9c46524. ± Comparison against base commit 8b229d0.

This pull request removes 125 and adds 483 tests. Note that renamed tests count towards both.
org.eclipse.team.internal.ui.synchronize.RefreshSubscriberParticipantJobProgressTests ‑ doRefreshDoesNotOverConsumeParentMonitor
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testFileModificationValidator
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testGetProviderById
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testGetProviderGeneric
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testIsShared
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testLinkFailure
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testLinkSuccess
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testMapFailure
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testMapSuccess
org.eclipse.team.tests.core.RepositoryProviderTests ‑ testMoveDeleteHook
…
org.eclipse.compare.tests.DiffColorsTest ‑ testCustomizedBaseColorIsPreserved
org.eclipse.compare.tests.DiffColorsTest ‑ testDarkPaletteMatchesAnnotationColors
org.eclipse.compare.tests.DiffColorsTest ‑ testLightThemeKeepsExistingPalette
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testFetchFileInfoInNonExistingParentHasName(int)[1] 0
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testFetchFileInfoInNonExistingParentHasName(int)[2] 8192
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testFetchFileInfoOfNonExistingFileHasName(int)[1] 0
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testFetchFileInfoOfNonExistingFileHasName(int)[2] 8192
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testListDirectoryAndGetFileInfosNeverReturnsNamelessEntry() repetition 1 of 5
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testListDirectoryAndGetFileInfosNeverReturnsNamelessEntry() repetition 2 of 5
org.eclipse.core.tests.filesystem.NativeHandlerTest ‑ testListDirectoryAndGetFileInfosNeverReturnsNamelessEntry() repetition 3 of 5
…

♻️ This comment has been updated with latest results.

@jasmin261098 jasmin261098 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can check this looks good to me.

A note for users who have adjusted their colors to the current scale would be good. It might confuse some people, but solving the underlying problem makes sense.

@tobiasmelcher
tobiasmelcher force-pushed the d031119/improve-diff-colors-dark-theme branch from f7ea397 to 7073a92 Compare October 9, 2026 14:22
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.

Poor diff highlight contrast in Dark Theme (Compare editor and Unified Diff)

2 participants