Skip to content

fix(icon): GitHub dark bg + correct monochrome wiring (#534)#575

Merged
rainxchzed merged 2 commits into
mainfrom
fix/icon-contrast-purple-bg
May 11, 2026
Merged

fix(icon): GitHub dark bg + correct monochrome wiring (#534)#575
rainxchzed merged 2 commits into
mainfrom
fix/icon-contrast-purple-bg

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 11, 2026

OP (#534, Pixel 8 light mode) reported low contrast between GHS app icon background #101010 and the foreground logo. Two changes:

  1. Background #101010#5E35B1 (Material 3 deep purple, matches the existing "Purple" Tweaks theme preset). White/light foreground now lands on saturated brand color. Splash screen auto-updates since it references the same @color/ic_launcher_background.

  2. Monochrome layer was wired to the colored @mipmap/ic_launcher_foreground, so Android 13+ "Themed icons" mode tinted a multi-color asset and looked off. Now points at the existing @drawable/ic_launcher_monochrome vector that was already in the tree but unused. Themed-icons mode now produces a properly wallpaper-tinted silhouette.

Desktop platforms (.icns / .ico / .png in composeApp/src/jvmMain/resources/logo/) are deliberately untouched in this PR — they need a full design pass with a 1024×1024 master to regenerate cleanly. Followup PR once Android version is validated visually.

Closes #534.

Summary by CodeRabbit

  • Style
    • Updated Android launcher background color from #101010 to #0D1117 for improved contrast.
    • Adjusted adaptive launcher icons so the monochrome layer references a dedicated drawable for more consistent rendering.
    • Simplified the app bar icon appearance—removed extra clipping, background and padding, now uses a fixed size for a cleaner look.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cdf0c2a1-cade-46d3-8678-c7f69b454c29

📥 Commits

Reviewing files that changed from the base of the PR and between 767f616 and c4e702d.

📒 Files selected for processing (1)
  • feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/HomeRoot.kt

Walkthrough

Updates launcher background color to #0D1117, changes both adaptive icon XMLs' <monochrome> drawable to @drawable/ic_launcher_monochrome, and simplifies the HomeTopAppBar navigation icon Image modifier to a fixed size(48.dp).

Changes

Android Launcher Icon Styling & AppBar

Layer / File(s) Summary
Background Color Update
composeApp/src/androidMain/res/values/colors.xml
ic_launcher_background changed from #101010#0D1117.
Adaptive Icon Monochrome References
composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml, composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml
<monochrome> drawable reference changed from @mipmap/ic_launcher_foreground@drawable/ic_launcher_monochrome.
HomeTopAppBar Navigation Icon
feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/HomeRoot.kt
Navigation icon Image styling simplified: removed circular clip, dark background, and extra padding; kept size(48.dp).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A hop, a tweak, a subtler shade,
I nudge the icon, trim the braid,
Monochrome finds its proper clue,
AppBar lightens—small and true,
Hops of code make visuals new.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely describes the main changes: fixing the app icon with GitHub dark background color and correcting monochrome layer wiring.
Linked Issues check ✅ Passed The code changes directly address issue #534 by updating the icon background color and fixing monochrome wiring to improve icon contrast and appearance.
Out of Scope Changes check ✅ Passed All changes are scoped to Android icon resources; the PR intentionally excludes desktop assets (PNG/ICO/ICNS), deferring that work to a follow-up PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/icon-contrast-purple-bg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 11, 2026

Greptile Summary

  • The monochrome layer fix (@drawable/ic_launcher_monochrome instead of @mipmap/ic_launcher_foreground) correctly resolves Android 13+ Themed Icons rendering; the referenced drawable exists in the tree. Both ic_launcher.xml and ic_launcher_round.xml are consistently updated.
  • The committed background color #0D1117 does not match the #5E35B1 Material 3 deep purple stated in the PR title and description; the dark-background contrast issue from 希望优化应用图标颜色 #534 is not addressed by this value.
  • HomeRoot.kt removes the forced circular clip and dark backing color from the in-app top-bar icon, aligning the in-app rendering with the new icon design intent.

Confidence Score: 3/5

Not safe to merge as-is — the core color change described in the PR is not present in the committed code.

The monochrome wiring fix is clean and correct, but the primary stated purpose of the PR — replacing #101010 with #5E35B1 to fix contrast — is unfulfilled. The actual committed value #0D1117 is still a near-black, leaving the original contrast complaint from #534 unresolved. This is a P1 discrepancy between the PR description and the committed artifact. Score is pulled below the P1 ceiling of 4 because the mismatch directly undermines the only visual-correctness goal of the PR.

composeApp/src/androidMain/res/values/colors.xml — committed color value does not match PR description.

Important Files Changed

Filename Overview
composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml Correctly rewires the layer from @mipmap/ic_launcher_foreground (multi-color) to @drawable/ic_launcher_monochrome (silhouette vector), fixing Themed Icons rendering on Android 13+.
composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml Same monochrome fix as ic_launcher.xml, applied to the round variant — consistent and correct.
composeApp/src/androidMain/res/values/colors.xml Background color changed to #0D1117 (GitHub dark-mode near-black) instead of the #5E35B1 Material 3 deep purple stated in the PR description and title — the contrast improvement described in the PR is not actually present in this commit.
feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/HomeRoot.kt Removes the forced circular clip, dark background, and padding from the in-app top-bar icon; the icon now renders as a plain 48dp square with ContentScale.Crop, consistent with relying on the drawable's own background.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Android Launcher Request] --> B{Icon Type}
    B -->|Standard / Round| C[adaptive-icon v26]
    C --> D["background: @color/ic_launcher_background #0D1117"]
    C --> E["foreground: @mipmap/ic_launcher_foreground multi-color"]
    C --> F{Android 13+ Themed Icons?}
    F -->|Yes| G["monochrome: @drawable/ic_launcher_monochrome silhouette vector (fixed)"]
    F -->|No| H[Monochrome layer ignored]
    G --> I[System tints with wallpaper color - correct silhouette]
    J[HomeRoot TopAppBar] --> K["Image: Res.drawable.app_icon Modifier.size(48.dp) contentScale = ContentScale.Crop"]
    K --> L["No clip / no forced dark bg (removed in this PR)"]
Loading

Reviews (5): Last reviewed commit: "Simplify app icon styling in HomeRoot" | Re-trigger Greptile

@rainxchzed rainxchzed force-pushed the fix/icon-contrast-purple-bg branch from e477103 to 3f5c8d0 Compare May 11, 2026 11:37
@rainxchzed rainxchzed changed the title fix(icon): purple bg + correct monochrome wiring (#534) fix(icon): GitHub dark bg + correct monochrome wiring (#534) May 11, 2026
Comment thread composeApp/src/androidMain/res/values/colors.xml
@rainxchzed rainxchzed force-pushed the fix/icon-contrast-purple-bg branch from 3f5c8d0 to e06596b Compare May 11, 2026 12:07
@rainxchzed rainxchzed changed the title fix(icon): GitHub dark bg + correct monochrome wiring (#534) fix(icon): match in-app triangle color for launcher bg (#534) May 11, 2026
@rainxchzed rainxchzed force-pushed the fix/icon-contrast-purple-bg branch from e06596b to 767f616 Compare May 11, 2026 12:12
@rainxchzed rainxchzed changed the title fix(icon): match in-app triangle color for launcher bg (#534) fix(icon): GitHub dark bg + correct monochrome wiring (#534) May 11, 2026
@rainxchzed rainxchzed merged commit a589ba8 into main May 11, 2026
@rainxchzed rainxchzed deleted the fix/icon-contrast-purple-bg branch May 11, 2026 13:09
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