@devries-cameron20 / t3code-1 / commits / cdbf324aa0
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): keep generated muted foreground dimmer than entered text (#9113)

oliver committed Sep 1, 2026 at 18:43 UTC cdbf324aa043b1bc5705159127d2b55f186d1b9b
2 files changed +4 -1
apps/web/src/themePalette.test.ts
+3
@@ -156,6 +156,9 @@ describe("theme files", () => {
156 expect(contrastRatio(colors.textMuted, colors.canvas)).toBeGreaterThanOrEqual(4.5);
157 expect(contrastRatio(colors.textMuted, colors.canvas)).toBeLessThan(5.5);
158 expect(contrastRatio(colors.mutedForeground, colors.muted)).toBeGreaterThanOrEqual(4.5);
159 + expect(contrastRatio(colors.mutedForeground, colors.muted)).toBeLessThan(
160 + contrastRatio(colors.text, colors.muted),
161 + );
162 expect(contrastRatio(colors.placeholder, colors.surfaceRaised)).toBeGreaterThanOrEqual(4.5);
163 expect(contrastRatio(colors.placeholder, colors.surfaceRaised)).toBeLessThan(
164 contrastRatio(colors.text, colors.surfaceRaised),
apps/web/src/themePalette.ts
+1 -1
@@ -916,7 +916,7 @@ export function createVividThemeColors(
916 themeOklchToThemeColor(
917 solveOklchLightness(textBase, surfaceRgb, 4.6, dark ? "lighter" : "darker"),
918 );
919 - const mutedForeground = foregroundOn(mutedRgb);
919 + const mutedForeground = themeRgbToThemeColor(readableThemeText(mutedRgb, textRgb, 1, 4.6));
920 const placeholder = themeRgbToThemeColor(readableThemeText(surfaceRaisedRgb, textRgb, 1, 4.6));
921
922 const actionHover: ThemeOklch = { ...action, L: action.L + (dark ? 0.06 : -0.06) };