The best way to control Claude Code, Codex and more from any computer or phone
fix(web): keep theme color alpha when a hex value is typed (#23136)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>
Victor Vogel committed
Nov 1, 2026 at 15:57 UTC
435cda96a38e6b38eeb03029f0b0b32efb4d0b02
2 files changed
+9
-1
apps/web/src/components/settings/ThemeColorPicker.tsx
+1
-1
@@ -144,7 +144,7 @@ function ThemeColorPickerPanel({
144
const nextHsv = hexToHsv(nextValue);
145
setHsv(nextHsv);
146
setRgbDraft(themeRgbValue(nextValue));
147
- onChange(nextValue.toLowerCase());
147
+ onChange(nextValue.toLowerCase() + alphaSuffix);
148
};
149
150
const handleRgbChange = (nextValue: string) => {
apps/web/src/components/settings/colorPickers.browser.test.tsx
+8
@@ -106,6 +106,14 @@ describe("theme color field", () => {
106
await echo("#ffffff");
107
expect(slider(HUE).getAttribute("aria-valuenow")).toBe("10");
108
});
109
+
110
+ it("keeps a translucent color's alpha when a hex value is typed", async () => {
111
+ await using screen = await renderThemeField("#22ccff80");
112
+ const { onChange } = screen;
113
+
114
+ await userEvent.fill(byLabel("Accent color picker hex value"), "#ff0000");
115
+ expect(onChange).toHaveBeenLastCalledWith("accent", "#ff000080");
116
+ });
117
});
118
119
async function renderAccentPicker(value: string) {