Skip to content

Desaturate dark theme background colors#37056

Merged
silverwind merged 6 commits intogo-gitea:mainfrom
silverwind:darkmono
Apr 1, 2026
Merged

Desaturate dark theme background colors#37056
silverwind merged 6 commits intogo-gitea:mainfrom
silverwind:darkmono

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 31, 2026

Desaturate all structural grey colors in the dark theme from blue-grey (H≈210°, S≈12-15%) to near-monochrome (H=220°, S=6%), using #1e1f20 as the page background color.

All colors preserve their original HSL lightness values. Semantic colors (primary accent, named colors, diff, alerts, badges, brand) are unchanged.

Motivation: The previous blue tint looked bad (kind of green-ish) on certain screens and I think a near-monochrome color is more neutral because its closer to being an inversion of the light theme.

Before and after:

Screenshot 2026-04-02 at 00 18 38 image

This PR was written with the help of Claude Opus 4.6

Desaturate all structural grey colors in the dark theme from
blue-grey (H≈210°, S≈12-15%) to near-monochrome (H=220°, S=6%),
using #18191b as the page background color. All colors preserve
their original lightness values.

Semantic colors (primary accent, named colors, diff, alerts,
badges, brand) are unchanged.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 31, 2026
@silverwind silverwind added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI labels Mar 31, 2026
silverwind and others added 2 commits March 31, 2026 16:33
Recompute all monochrome colors using OKLCH color space instead
of HSL to preserve perceptual lightness accurately. Use OKLCH
H=250° (cool blue) with C=0.0034 to maintain the cool-neutral
character (B >= G >= R) rather than the warm tint that OKLCH
H=8.6° from #18191b produced.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Replace near-monochrome colors with full monochrome (OKLCH C=0,
pure R=G=B grey). Perceptual lightness preserved via OKLCH L
from the original blue-grey values. Body color is now #1f1f1f
(perceptual lightness match for original #1b1f23).

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind changed the title Change dark theme to near-monochrome Change dark theme to monochrome Mar 31, 2026
Revert to the original HSL(220°, 6%) near-monochrome approach
with #18191b as body color.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind changed the title Change dark theme to monochrome Change dark theme to near-monochrome Mar 31, 2026
@silverwind silverwind requested a review from Copilot March 31, 2026 15:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Desaturates the Gitea dark theme’s structural greys toward a near-monochrome palette and aligns the page background with MDN’s #18191b.

Changes:

  • Updated secondary/neutral grey ramp variables (including alpha variants) to reduce saturation.
  • Adjusted target-based UI surfaces (body, box, menu/card, hover/active, shadows) to the new neutral greys.
  • Tweaked console-related foreground/background/border/link colors to match the new neutral palette.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bircni
Copy link
Copy Markdown
Member

bircni commented Mar 31, 2026

Could you add a UI comparison? before --> after?

@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Mar 31, 2026

It's basically just -10% absolute saturation with a slight hue shift on the backgrounds, but I can provide more screenshots.

@bircni
Copy link
Copy Markdown
Member

bircni commented Mar 31, 2026

suggestion: Add a new theme called oled or smth to be completely black?

@silverwind silverwind changed the title Change dark theme to near-monochrome Desaturate dark theme background colors Mar 31, 2026
@silverwind
Copy link
Copy Markdown
Member Author

silverwind commented Apr 1, 2026

No, I don't think it's warranted to introduce another theme now especially because the saturation change here isn't too intrusive imho.

The current light/dark themes are supposed to be near-inversions in their coloring. A "soft dark" theme variant like GitHub has can be considered to be added later.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 1, 2026
@bircni bircni requested a review from lafriks April 1, 2026 18:30
* origin/main:
  Update JS dependencies and misc tweaks (go-gitea#37064)
  Redirect to the only OAuth2 provider when no other login methods and fix various problems (go-gitea#36901)
  Show workflow link (go-gitea#37070)
  Remove leftover `webpackChunkName` comments from codeeditor (go-gitea#37062)
  Update Go dependencies (go-gitea#36781)
  Add webhook name field to improve webhook identification (go-gitea#37025) (go-gitea#37040)
  Upgrade `go-git` to v5.17.2 (go-gitea#37060)
  Replace Monaco with CodeMirror (go-gitea#36764)
  Update Combine method to treat warnings as failures and adjust tests (go-gitea#37048)
  Raise minimum Node.js version to 22.18.0 (go-gitea#37058)
  Update golangci-lint to v2.11.4 (go-gitea#37059)
  Upgrade `golang.org/x/image` to v0.38.0 (go-gitea#37054)

# Conflicts:
#	web_src/css/themes/theme-gitea-dark.css
@silverwind
Copy link
Copy Markdown
Member Author

Comparison screenshot added to #37056 (comment).

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 1, 2026
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind
Copy link
Copy Markdown
Member Author

Changed body background from #18191b to #1e1f20, this is closer to the old bg color and gives a tiny bit more distinction from other background like <input>.

@silverwind silverwind merged commit b53f25a into go-gitea:main Apr 1, 2026
26 checks passed
@silverwind silverwind deleted the darkmono branch April 1, 2026 23:24
@GiteaBot GiteaBot added this to the 1.26.0 milestone Apr 1, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 2, 2026
* main:
  Fix NuGet package upload error handling (go-gitea#37074)
  Desaturate dark theme background colors (go-gitea#37056)
  Update JS dependencies and misc tweaks (go-gitea#37064)
  Redirect to the only OAuth2 provider when no other login methods and fix various problems (go-gitea#36901)
  Show workflow link (go-gitea#37070)
  Remove leftover `webpackChunkName` comments from codeeditor (go-gitea#37062)
  Update Go dependencies (go-gitea#36781)
  Add webhook name field to improve webhook identification (go-gitea#37025) (go-gitea#37040)
  Upgrade `go-git` to v5.17.2 (go-gitea#37060)
  Replace Monaco with CodeMirror (go-gitea#36764)
  Update Combine method to treat warnings as failures and adjust tests (go-gitea#37048)
  Raise minimum Node.js version to 22.18.0 (go-gitea#37058)
  Update golangci-lint to v2.11.4 (go-gitea#37059)
  Upgrade `golang.org/x/image` to v0.38.0 (go-gitea#37054)
  Increase e2e test timeouts on CI to fix flaky tests (go-gitea#37053)
  Refactor "org teams" page and help new users to "add member" to an org (go-gitea#37051)
silverwind added a commit to silverwind/gitea that referenced this pull request Apr 2, 2026
* origin/main: (192 commits)
  Fix NuGet package upload error handling (go-gitea#37074)
  Desaturate dark theme background colors (go-gitea#37056)
  Update JS dependencies and misc tweaks (go-gitea#37064)
  Redirect to the only OAuth2 provider when no other login methods and fix various problems (go-gitea#36901)
  Show workflow link (go-gitea#37070)
  Remove leftover `webpackChunkName` comments from codeeditor (go-gitea#37062)
  Update Go dependencies (go-gitea#36781)
  Add webhook name field to improve webhook identification (go-gitea#37025) (go-gitea#37040)
  Upgrade `go-git` to v5.17.2 (go-gitea#37060)
  Replace Monaco with CodeMirror (go-gitea#36764)
  Update Combine method to treat warnings as failures and adjust tests (go-gitea#37048)
  Raise minimum Node.js version to 22.18.0 (go-gitea#37058)
  Update golangci-lint to v2.11.4 (go-gitea#37059)
  Upgrade `golang.org/x/image` to v0.38.0 (go-gitea#37054)
  Increase e2e test timeouts on CI to fix flaky tests (go-gitea#37053)
  Refactor "org teams" page and help new users to "add member" to an org (go-gitea#37051)
  Refactor issue sidebar and fix various problems (go-gitea#37045)
  Add tests for pull request's content_version in API (go-gitea#37044)
  Enable concurrent vitest execution (go-gitea#36998)
  Fix theme discovery and Vite dev server in dev mode (go-gitea#37033)
  ...

# Conflicts:
#	templates/user/dashboard/feeds.tmpl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants