@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrast
维护者通常 1 天内回复
@KhadeerBasha1232 已经在做这个了。
开始于 2026年11月24日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- css, typescript
- 领域
- accessibility, design
调研方向
从 packages/ui/src/styles/tokens/colors.css 和 theme.css 中的 token 定义开始,然后追踪 packages/ui/src/theme/v2/default-primitives.ts 和 mapping.ts 如何暴露相同的值。在编辑之前,针对列出的背景 token,分别计算候选灰色和黄色在浅色与深色模式下的 WCAG 相对亮度。完成意味着浅色/深色下的 --v2-text-text-faint 和浅色下的 --v2-state-fg-warning 在其预期表面上至少达到 4.5:1,同时 TS 主题文件中镜像的值保持同步。
由索引模型根据 Issue 内容生成。
描述
In @opencode/ui's v2 tokens (packages/ui/src/styles/tokens/colors.css and packages/ui/src/styles/tokens/theme.css, plus packages/ui/src/theme/v2/default-primitives.ts and packages/ui/src/theme/v2/mapping.ts), three text colour pairings fall below the WCAG 2.1 AA 4.5:1 contrast target for normal-sized text:
-
Light
--v2-text-text-faint(var(--v2-grey-600),#808080)- on
--v2-background-bg-base(#ffffff): 3.95:1 - on
--v2-background-bg-layer-01(#fafafa): 3.78:1 - on
--v2-background-bg-layer-02(#f2f2f2): 3.53:1 - on
--v2-background-bg-layer-03(#eeeeee): 3.40:1
- on
-
Dark
--v2-text-text-faint(var(--v2-grey-600),#808080)- on
--v2-background-bg-base(#161616): 4.58:1 (passes onbg-base) - on
--v2-background-bg-layer-01(#242424): 3.93:1 - on
--v2-background-bg-layer-02(#2e2e2e): 3.44:1 - on
--v2-background-bg-layer-03(#3a3a3a): 2.88:1
- on
-
Light
--v2-state-fg-warning(var(--v2-yellow-800),#cb9f34)- on
--v2-state-bg-warning(var(--v2-yellow-100),#fefaec): 2.35:1 - on
--v2-background-bg-base(#ffffff): 2.46:1 - on
--v2-background-bg-layer-01(#fafafa): 2.35:1 - on
--v2-background-bg-layer-02(#f2f2f2): 2.19:1
- on
All ratios are computed with the WCAG 2.1 relative-luminance formula. Raising --v2-text-text-faint (light and dark) and light --v2-state-fg-warning to meet the 4.5:1 AA target on their intended surfaces will bring both @opencode/ui and downstream themes that mirror these tokens (such as rune-theme-opencode) up to AA contrast.
- 主要语言
- TypeScript
- 星标
- 228k
- 派生
- 31k
- 平均合并
- 3 小时 22 分钟
- 30 天内合并 PR
- 476
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2未关闭area/desktop platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 66/100
anomalyco/opencode#66079 · 1 条评论 ·
维护者通常 1 天内回复
-
area/mcp platform/windows status/repro-simulated type/bug version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#66073 · 1 条评论 ·
维护者通常 1 天内回复
-
area/providers platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 74/100
anomalyco/opencode#66001 · 1 条评论 ·
维护者通常 1 天内回复
-
area/mcp platform/windows type/feature version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#65997 · 1 条评论 ·
维护者通常 1 天内回复
-
area/core platform/windows type/bug version/v2
难度 2/5 1-3 小时 新手友好度 80/100
anomalyco/opencode#65880 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
lidofinance/validator-ejector#233 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Major
难度 2/5 1-3 小时 新手友好度 78/100
linagora/twake-mail-admin#742 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
OpenSlides/openslides-client#6728 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100