A color from the palette, deterministic for the same userId
Remarks
Uses a hash function to ensure the same userId always maps to the same color,
providing visual consistency across sessions and components.
Example
getUserColor('user-123') // consistent color from default palette getUserColor('user-123', ['#f00', '#0f0']) // consistent color from custom palette getUserColor(undefined) // first color in palette
Generate a consistent avatar color based on a userId.