Avatar figures must use app greens-to-black, not the style rainbow (rings ring override) #539

Closed
opened 2026-09-14 21:23:08 +00:00 by crueber · 3 comments
Owner

Follow-up to #525 (user directive in chat). The rings figure color comes from the style's built-in 16-color rainbow collection (coral→blue→purple→pink), so generated avatars mix app emerald (background) with indigo-family figures. r.options.color(name) (resolver.go:453) lets user-supplied colors override the style collection: pass a greens-to-black ring palette (Tailwind emerald scale + black, e.g. emerald-300→950 + 000000) via the ring option key alongside seed/backgroundColor. Test must assert none of the 16 default ring colors appear in output. Existing holders keep avatars (no migration); docs decision.

Follow-up to #525 (user directive in chat). The rings figure color comes from the style's built-in 16-color rainbow collection (coral→blue→purple→pink), so generated avatars mix app emerald (background) with indigo-family figures. r.options.color(name) (resolver.go:453) lets user-supplied colors override the style collection: pass a greens-to-black ring palette (Tailwind emerald scale + black, e.g. emerald-300→950 + 000000) via the ring option key alongside seed/backgroundColor. Test must assert none of the 16 default ring colors appear in output. Existing holders keep avatars (no migration); docs decision.
Author
Owner

Fix PR: #540 (branch fix/issue-539). Passes emerald-300→950 + black via the ringColor option; strong pin test asserts none of the 16 style rainbow colors appears across seeds. Full identity package -race PASS, coverage 95.6%, gofmt/vet clean, no new deps, no migration.

Fix PR: https://git.packden.us/crueber/walhub/pulls/540 (branch fix/issue-539). Passes emerald-300→950 + black via the ringColor option; strong pin test asserts none of the 16 style rainbow colors appears across seeds. Full identity package -race PASS, coverage 95.6%, gofmt/vet clean, no new deps, no migration.
Author
Owner

Review of PR #540 (fix/issue-539, commit cafa3c7) — all checks done in scratch worktree /tmp/pr540 (removed afterward); main worktree untouched (tracked files clean); no browser (SVG fill assertions + reasoning only, per task rules); no docker/compose/system changes.

(1) Option key CORRECT: vendored dicebear-go/v10@v10.7.0 internal/render/options.go:173-179 reads name+"Color" (options.color), resolver.go:453 user-supplied list wins over style collection, style component is named "ring" (rings.json components+colors both keyed "ring") → "ringColor" is the right key, not "ring". JSON round-trip []string spelling matches the #525 backgroundColor precedent.

(2) Palette all app-greens + black: 6ee7b7/34d399/10b981/059669/047857/065f46/064e3b/022c22 = canonical Tailwind emerald 300→950 exactly, plus 000000. Background stays 059669 (emerald-600). Docs honestly notes tone-on-tone figure possible — acceptable, still on-brand.

(3) Rainbow-absence test STRONG + NON-VACUOUS: TestGenerateGreensOnlyFigures asserts none of the 16 style defaults appears across 8 ordinary+hostile seeds, every fill is a palette member, fills non-empty (override can't silently empty the figure), and re-runs the sanitize gate. Verified non-vacuous with a temp probe: old code (no ringColor) emits a rainbow color for dave@example.com (1/16), so the new test fails on old code. Pinned 16 values match rings.json colors.ring.values exactly (modulo # prefix/ToHex).

(4) Every fill in-palette: eyeballed generated SVG (temp probe, since removed): dave@example.com → fills {059669, 10b981}, erin@example.com → {059669, 10b981}; all palette members, no gradient elements. Test enforces this across all 8 seeds.

(5) Seed/sanitize/determinism INTACT: checkAvatarSVG + seed handling untouched by diff; TestGenerateDeterminism + TestGenerateSeedAbsent still pass.

(6) Existing holders untouched: diff is 3 files only (avatar.go, avatar_test.go, docs decision) — no profile/migration code; docs states no retroactive regen.

(7) Law 1 / law 12 / quality gates: no go.mod/go.sum change (same dicebear modules); gofmt clean; go vet clean; go build ./... OK; go test ./internal/identity/ -race full package PASS; coverage 95.4% statements (≥95% gate holds; PR claimed 95.6%, trivial variance). Docs decision entry accurate (palette, override mechanism with vendored file cites, tone-on-tone note, no migration, law-1 note). One cosmetic nit (not blocking, no fix pushed): the pre-existing "Rationale:" continuation line for #525 gained a 3-space indent in the docs diff — harmless.

MERGE RECOMMENDATION: ready to merge.

Review of PR #540 (fix/issue-539, commit cafa3c7) — all checks done in scratch worktree /tmp/pr540 (removed afterward); main worktree untouched (tracked files clean); no browser (SVG fill assertions + reasoning only, per task rules); no docker/compose/system changes. (1) Option key CORRECT: vendored dicebear-go/v10@v10.7.0 internal/render/options.go:173-179 reads name+"Color" (options.color), resolver.go:453 user-supplied list wins over style collection, style component is named "ring" (rings.json components+colors both keyed "ring") → "ringColor" is the right key, not "ring". JSON round-trip []string spelling matches the #525 backgroundColor precedent. (2) Palette all app-greens + black: 6ee7b7/34d399/10b981/059669/047857/065f46/064e3b/022c22 = canonical Tailwind emerald 300→950 exactly, plus 000000. Background stays 059669 (emerald-600). Docs honestly notes tone-on-tone figure possible — acceptable, still on-brand. (3) Rainbow-absence test STRONG + NON-VACUOUS: TestGenerateGreensOnlyFigures asserts none of the 16 style defaults appears across 8 ordinary+hostile seeds, every fill is a palette member, fills non-empty (override can't silently empty the figure), and re-runs the sanitize gate. Verified non-vacuous with a temp probe: old code (no ringColor) emits a rainbow color for dave@example.com (1/16), so the new test fails on old code. Pinned 16 values match rings.json colors.ring.values exactly (modulo # prefix/ToHex). (4) Every fill in-palette: eyeballed generated SVG (temp probe, since removed): dave@example.com → fills {059669, 10b981}, erin@example.com → {059669, 10b981}; all palette members, no gradient elements. Test enforces this across all 8 seeds. (5) Seed/sanitize/determinism INTACT: checkAvatarSVG + seed handling untouched by diff; TestGenerateDeterminism + TestGenerateSeedAbsent still pass. (6) Existing holders untouched: diff is 3 files only (avatar.go, avatar_test.go, docs decision) — no profile/migration code; docs states no retroactive regen. (7) Law 1 / law 12 / quality gates: no go.mod/go.sum change (same dicebear modules); gofmt clean; go vet clean; go build ./... OK; go test ./internal/identity/ -race full package PASS; coverage 95.4% statements (≥95% gate holds; PR claimed 95.6%, trivial variance). Docs decision entry accurate (palette, override mechanism with vendored file cites, tone-on-tone note, no migration, law-1 note). One cosmetic nit (not blocking, no fix pushed): the pre-existing "Rationale:" continuation line for #525 gained a 3-space indent in the docs diff — harmless. MERGE RECOMMENDATION: ready to merge.
Author
Owner

Fixed by PR #540 (review clean — ringColor key verified, palette all app-greens + black, rainbow-absence proven non-vacuous), merged. Closing.

Fixed by PR #540 (review clean — ringColor key verified, palette all app-greens + black, rainbow-absence proven non-vacuous), merged. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#539
No description provided.