(name: string)
| 21 | ] |
| 22 | |
| 23 | function tone(name: string) { |
| 24 | let hash = 0 |
| 25 | for (const char of name) hash = (hash * 31 + char.charCodeAt(0)) >>> 0 |
| 26 | return palette[hash % palette.length] |
| 27 | } |
| 28 | |
| 29 | export function agentColor(name: string, custom?: string) { |
| 30 | if (custom) return custom |