`src/lib/utils.js:129-153` — `hexToRgb`, `hexToRgba`, `darkenHex` each repeat the regex validation and per-channel parse. The recursive fallback (`return hexToRgb(DEFAULT_DIE_COLOR)`) makes them harder to read than they need to be.
Fix: extract `parseHex(hex) → [r,g,b] | null`, then write all three formatters as one-liners. Removes ~15 lines and the recursion.
(From comprehensive review, finding B2.)
`src/lib/utils.js:129-153` — `hexToRgb`, `hexToRgba`, `darkenHex` each repeat the regex validation and per-channel parse. The recursive fallback (`return hexToRgb(DEFAULT_DIE_COLOR)`) makes them harder to read than they need to be.
Fix: extract `parseHex(hex) → [r,g,b] | null`, then write all three formatters as one-liners. Removes ~15 lines and the recursion.
(From comprehensive review, finding B2.)