Shareable avatar URLs + custom color picker#81
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viareplaceStateon 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)
#00ff88on hair recolors the avatar and the URL updates🤖 Generated with Claude Code