Skip to content

[ryoku] matugen: provide distinct dark and light palettes in carrier - #753

Open
Satirito wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
Satirito:fix/matugen-zed-dual-themes
Open

Satirito wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
Satirito:fix/matugen-zed-dual-themes

Conversation

@Satirito

@Satirito Satirito commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Zed editor and other multi-theme templates define dual appearances (Matugen Dark and Matugen Light) referencing {{colors.role.dark.hex}} and {{colors.role.light.hex}}. Previously, parseMatugenPalette discarded the dark and light buckets and matugenCarrier duplicated the active palette across all three keys (default, dark, light). Consequently, both themes received identical colors, causing broken or inverted styling when wallpapers were light or using smart mode.

This PR:

  • Updates parseMatugenPalette to extract active, dark, and light palettes directly from matugen JSON buckets while preserving modeKey priority fallback for the active palette.
  • Populates matugenCarrier with separate submaps for default, dark, and light, while maintaining backward compatibility by flattening default entries directly on the role for templates using {{colors.role.hex}}.
  • Adds safe ARGB conversion handling when color roles are empty.
  • Updates template rendering signatures and caller pipelines accordingly.

Area

ryoku

How it was tested

  • Ran go test -v -run "TestMatugen" ./... in ryoku/shell/ipc: all tests pass cleanly (TestMatugenIsolatedDrive, TestMatugenApply, TestMatugenApplyInvokesBinary, TestMatugenApplyNeutralizesAchromaticWallpaper).
  • Verified binary compiles without warnings (go build).
  • Inspected generated Zed theme and matugen carrier output to confirm distinct background and accent values across dark and light themes.

Checklist

  • One logical change, with a clear [area] scope: summary commit subject.
  • Matching CHANGELOG.md updated in the area I touched.
  • The git hooks pass locally; I did not use --no-verify.
  • Lua parses (luac -p), shell scripts pass bash -n, and QML passes qmllint where applicable.
  • No duplicated config, no dead code, no commented-out code, no em-dash.
  • Docs updated if behavior or layout changed.

Zed editor and other multi-theme templates define dual appearances
(Matugen Dark and Matugen Light) referencing {{colors.role.dark.hex}} and
{{colors.role.light.hex}}. Previously, parseMatugenPalette discarded the
dark and light buckets and matugenCarrier duplicated the active palette
across all three keys, causing both themes to render identically.

Extract active, dark, and light palettes from matugen JSON output and
populate the carrier with respective color maps while preserving backward
compatibility for {{colors.role.hex}} flat lookups.

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