MCPcopy Create free account
hub / github.com/anomalyco/opencode / tone

Function tone

packages/app/src/utils/agent.ts:23–27  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

21]
22
23function 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
29export function agentColor(name: string, custom?: string) {
30 if (custom) return custom

Callers 1

agentColorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected