Skip to content

Shareable avatar URLs + custom color picker#81

Merged
bluerssen merged 4 commits into
masterfrom
share-and-pick
Jul 5, 2026
Merged

Shareable avatar URLs + custom color picker#81
bluerssen merged 4 commits into
masterfrom
share-and-pick

Conversation

@bluerssen

Copy link
Copy Markdown
Contributor

Summary

Two features that multiply the value of the existing content:

Shareable avatar URLs. The avatar's full configuration now lives in the URL (?hair=Mohawk&hairColor=F2C94C&…), updated via replaceState on every change and parsed back on load. Values are strictly validated (style names against config, colors as 6-digit hex — they're interpolated into inline SVG markup, so validation doubles as sanitization). Invalid or missing params fall back to the random start. The share modal's Twitter link now shares your avatar, not just the site, and a new Copy Link button copies the URL with "Copied!" feedback.

Custom color picker. Each colorable palette (skin, hair, facial hair, body, background) ends with a rainbow swatch that opens the native color picker — any hex, live preview while dragging, and custom colors survive URL sharing.

Verification (headless browser on production build)

  • Fresh load writes the randomized styles into the URL; reloading the same URL reproduces the avatar
  • Deep link with 10 params renders exactly as encoded; invalid values are dropped
  • Custom picker: setting #00ff88 on hair recolors the avatar and the URL updates
  • Modal: tweet href contains the encoded avatar URL; Copy Link shows "Copied!"; zero console errors throughout

⚠️ Do not merge — awaiting Brian's review.

🤖 Generated with Claude Code

bluerssen and others added 3 commits July 4, 2026 12:53
Styles serialize to query params on every change (replaceState, no
history spam) and are read back validated on load — style names must
exist in config and colors must be 6-hex (they're interpolated into
inline SVG, so nothing else may pass). Missing/invalid params fall back
to the random starting avatar. The share modal's tweet link now shares
the current avatar URL, and a Copy Link button copies it directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A native color input styled as a rainbow swatch at the end of each
colorable palette row; picked colors flow through the normal onChange
path and stay shareable via URL (validated by hex shape, not palette
membership).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Brian-approved expansion round (previewed before commit):
- Eyes: Closed, Hearts, Dizzy, Sideeye
- Mouths: Grin, Tongue, Whistle, Laugh
- Noses: Pointed, Button
- Bodies: Hoodie, Stripes
- New Accessories selector (z-layer above hair) with Earring and
  Earrings, its own metals+brights palette, and None weighted to 60%
  in randomize so random avatars stay understated

Cut during review: Vneck, Chinstrap, Handlebar, Headphones/Earbuds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Avatar expansion: 12 new styles + Accessories category
@bluerssen bluerssen merged commit c1b87e1 into master Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant