Skip to content

feat(settings): editable hex input for brand color - #78

Merged
brett-buskirk merged 1 commit into
mainfrom
feat/branding-color-picker
Jul 28, 2026
Merged

feat(settings): editable hex input for brand color#78
brett-buskirk merged 1 commit into
mainfrom
feat/branding-color-picker

Conversation

@brett-buskirk

Copy link
Copy Markdown
Owner

What & why

Closes #74. The Branding section already had the OS color picker (a small swatch — easy to miss) and preset swatches, but the hex was read-only — no way to type or paste an exact brand color. This adds an editable hex field for precise/custom colors, alongside the picker and presets.

Changes

  • utils/color.normalizeHex — lowercases, adds a missing #, and expands #rgb#rrggbb; returns null for invalid input (caller keeps the prior value).
  • BrandColorPicker (new component) — the OS color picker + an editable hex input (keeps a local draft so partial typing is smooth; only commits a valid, normalized hex) + the preset swatches, with the active preset highlighted.
  • Settings — swaps the inline block for <BrandColorPicker>; brandColor stays in the form via defaultValues + setValue.

Verification

npm run build ✓ · npm run check:cycles ✓ · npm run test:run 247 pass (+8: normalizeHex cases + typing a valid/incomplete hex + preset click). Visual for your eyes — you can now type/paste any hex, use the OS picker, or click a preset, and they stay in sync.

🤖 Generated with Claude Code

Closes #74. The Branding section already had the OS color picker and
preset swatches, but the hex was read-only — no way to type or paste an
exact brand color. Add an editable hex field alongside the picker and
presets, extracted into a BrandColorPicker component.

- utils/color: normalizeHex — lowercase, add missing #, expand #rgb
  shorthand; null for invalid (caller keeps the prior value).
- BrandColorPicker: OS picker + editable hex field (local draft so partial
  typing is smooth; commits only a valid normalized hex) + presets with the
  active one highlighted.
- Settings: swap the inline block for <BrandColorPicker>. brandColor stays
  in the form via defaultValues + setValue (no registered input needed).
- Tests for normalizeHex and the component (typed hex, incomplete hex,
  preset click).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploying helm with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff19e6c
Status: ✅  Deploy successful!
Preview URL: https://4c7ffead.helm-d5s.pages.dev
Branch Preview URL: https://feat-branding-color-picker.helm-d5s.pages.dev

View logs

@brett-buskirk brett-buskirk added enhancement New feature or request design Visual design / UI labels Jul 28, 2026
@brett-buskirk brett-buskirk self-assigned this Jul 28, 2026
@brett-buskirk brett-buskirk added this to the v1.2.0 — Post-launch milestone Jul 28, 2026
@github-actions

Copy link
Copy Markdown

✅ AgentGate: Passed

5 files changed  ·  +141 -21 lines

No issues found.

Generated by AgentGate

@brett-buskirk
brett-buskirk merged commit 9509ad7 into main Jul 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design Visual design / UI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a color picker to Branding for custom brand colors

1 participant