Repository navigation
feat(ui): calibrate GUI themes for WCAG 2.2 and add 6 new themes (opencode#66521, #66528) - #1296
Merged
Merged
Conversation
…ncode#66521, #66528)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port official GUI theme updates from
anomalyco/opencodedev(opencode#66521andopencode#66528):opencode#66521,5e000543a6): regeneratedapps/desktop/assets/themes.jsonfrom the calibrated OKLCH 13-step neutral scale, contrast-calibrated hue ramps, WCAG 2.2 foreground hierarchy (text-base>= 7:1,text-muted>= 4.5:1,text-faint>= 3:1,text-accent/ state badges / contrast controls >= 4.5:1,border-focus>= 3:1), andv1CodeAndDiffBridge(aligning code blocksbackground-strongertobackground-bg-layer-01and contrast-checking syntax colors on non-default themes).opencode#66528,04eccc3012): addedalabaster(Alabaster),cyberdream(Cyberdream),modus(Modus),oxocarbon(Oxocarbon),poimandres(Poimandres), andvscode(VS Code) in alphabetical picker order afteroc-2(OpenCode): 36 -> 42 themes total.apps/desktop/tools/themes.ts: updated token resolution to merge{ ...v1, ...v2 }matching official's:rootCSS cascade (packages/ui/src/theme/context.tsx) so unprefixedv1CodeAndDiffBridgeoverrides fromresolveThemeVariantV2take precedence over v1 defaults while keepingoc-2untouched, and included the calibrated theme tokens read directly by the UI (blue-400,blue-700,blue-1100,grey-500,grey-700,red-900,yellow-900,icon-weak-base,icon-warning-base).Note on
packages/ui/src/theme/context.tsxroot background update inopencode#66521: our desktop shell already fills the window background and caption color fromp.bg_deep(background-bg-deep), so non-default themes pick up the calibrated root background automatically.Verification
45763334613on exact head8516e08350-guardrails,build-macos,build-windows (x64),build-windows (arm64), andbuild-linux (x64)passed (Linux arm64 skipped).apps/desktop/assets/themes.jsonparse cleanly, every value is a valid#rrggbbaahex or an existingalpha-*palette entry inapps/desktop/assets/theme.json, all existingoc-2tokens are unchanged, and all 41 non-default themes x 2 modes (82 variants) pass every WCAG 2.2 contrast andbackground-stronger == background-bg-layer-01check frompackages/ui/src/theme/v2/resolve.test.ts.45763334613, fixture, no server; before =c1360881ed): all 5 cases passed:bg_deep #f1f1f1ff,bg_base #f7f7f7ff(before:#fafafaff/#ffffffffoc-2fallback); Modus lightbg_deep #f9f9f9ff,bg_base #ffffffff.#0b0d0eff/#16181aff(code#232527ff); Oxocarbon#0a0b0bff/#161617ff(code#232324ff); Poimandres#10121aff/#1b1e28ff(code#272a35ff); VS Code#131313ff/#1f1f1fff(code#2b2b2bff).#21282dff/#2d353bff/ code#353d43ff(before:#1a2228ff/#1c252bff/ code#1a2228ff); Dracula#11121bff/#1d1e28ff/ code#292a34ff(before:#12131cff/#151720ff/ code#12131cff); Tokyo Night#0f0f19ff/#1a1b26ff/ code#262733ff(before:#10111aff/#13141eff/ code#10111aff).oc-2theme unchanged: bit-identical PNG renders vsc1360881ed(oc-2dark: 83320/83320 bytes;oc-2light: 83442/83442 bytes).