Skip to content

fix(docs): make README logo visible in GitHub dark mode - #16

Merged
weilhuang merged 2 commits into
mainfrom
cursor/readme-logo-dark-mode-fec8
Sep 14, 2026
Merged

weilhuang merged 2 commits into
mainfrom
cursor/readme-logo-dark-mode-fec8

Conversation

@weilhuang

@weilhuang weilhuang commented Sep 14, 2026

Copy link
Copy Markdown
Owner

变更说明

GitHub 深色模式下,README 顶部 logo 几乎不可见:原先嵌入的是 src/main/resources/icons/original/arthasWorkbenchDiagnosticWave_128x128.png,黑描边 + 透明背景,叠在 GitHub 深灰背景上会“消失”。

这次把 README 头图换成单一中对比品牌色矢量 logo保留原设计(窗口框、标题栏三圆点、中间锯齿波形),不改 IDE / 插件图标。

做法

  • 新增 docs/assets/logo-readme.svg:真实 SVG 路径,描边/圆点使用与 README badge 一致的 #1677ff,并带很浅的窗体填充。
  • CSS @media (prefers-color-scheme) 只在同一蓝色家族内微调(浅色 #0a66d1、深色 #58a6ff),不会切到近黑/近白。因此当 GitHub 外观与 OS prefers-color-scheme 不一致时,logo 仍然可读。
  • README 用单张 <img> 引用该 SVG,居中布局不变。
  • 原始 PNG/SVG 仍留在 src/main/resources/icons/original/,未覆盖。

第一版曾用 <picture> 在近黑/近白两套稿之间切换。Codex 指出这会跟随 OS 而不是 GitHub 主题,已改为单一品牌色方案。

Before / After

Light (#ffffff) Dark (#0d1117)
Before 黑描边,浅色背景可见 黑描边叠深灰,logo 几乎消失
After 同一份蓝色线稿,浅底清晰 同一份蓝色线稿,深底清晰(含 GitHub Dark + OS Light 错配)

Brand-blue README logo on GitHub light and dark backgrounds

未改 badges、其它文档截图或插件代码。

验证方式

  • 对照原始 arthasWorkbenchDiagnosticWave_128x128.svg 路径,确认窗口 / 三点 / 波形一致
  • 确认原 PNG 仅被 README 引用,IDE 图标未覆盖
  • 同一 SVG 放在 #ffffff#0d1117 上目视确认都清晰(含 OS 为浅色时深色画布上的蓝色稿)
  • 已去掉 <picture> 近黑/近白切换,避免 GitHub 主题与 OS 偏好不一致时选错稿

UI 或交互变化

仅 README 头图。插件 IDE UI 无变化。

额外说明

Review 时请重点看:单一品牌色是否足够保留原线稿气质,以及在 GitHub Light / Dark(含手动指定主题)下是否都可读。

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Replace the black-on-transparent PNG header icon with theme-aware SVGs
that keep the original window, title-bar dots, and waveform motif.

Co-authored-by: wl2027 <weil82943@gmail.com>
@weilhuang
weilhuang marked this pull request as ready for review September 14, 2026 08:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T08:11:13.322970Z 1f5e0bf Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f5e0bf8b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
Comment on lines +9 to +10
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-readme-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="docs/assets/logo-readme-light.svg">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Decouple the logo variant from the OS color preference

When a user's GitHub appearance differs from their OS/browser preference—for example, GitHub is explicitly set to Dark while the OS prefers Light—this <picture> selects logo-readme-light.svg, whose #1f2328 strokes are again nearly invisible on the dark page. The inverse combination similarly puts the near-white variant on a light page, and the fallback <img> is never considered because one of these media queries always matches. Use a single color/background that contrasts in both themes or another mechanism that follows GitHub's selected page theme.

Useful? React with 👍 / 👎.

…emes

Drop OS-based <picture> variants. A single #1677ff SVG stays readable
when GitHub appearance does not match prefers-color-scheme.

Co-authored-by: wl2027 <weil82943@gmail.com>
@weilhuang
weilhuang merged commit 02c3687 into main Sep 14, 2026
3 checks passed
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.

2 participants