MCPcopy Create free account
hub / github.com/SamuelZ12/longcut / getTopicColor

Function getTopicColor

lib/utils.ts:47–61  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

45
46// Generate distinct colors for topics
47export function getTopicColor(index: number): { bg: string; border: string; text: string } {
48 const colors = [
49 { bg: 'bg-blue-100', border: 'border-blue-500', text: 'text-blue-900' },
50 { bg: 'bg-purple-100', border: 'border-purple-500', text: 'text-purple-900' },
51 { bg: 'bg-green-100', border: 'border-green-500', text: 'text-green-900' },
52 { bg: 'bg-orange-100', border: 'border-orange-500', text: 'text-orange-900' },
53 { bg: 'bg-pink-100', border: 'border-pink-500', text: 'text-pink-900' },
54 { bg: 'bg-teal-100', border: 'border-teal-500', text: 'text-teal-900' },
55 { bg: 'bg-indigo-100', border: 'border-indigo-500', text: 'text-indigo-900' },
56 { bg: 'bg-red-100', border: 'border-red-500', text: 'text-red-900' },
57 { bg: 'bg-yellow-100', border: 'border-yellow-500', text: 'text-yellow-900' },
58 { bg: 'bg-cyan-100', border: 'border-cyan-500', text: 'text-cyan-900' },
59 ];
60 return colors[index % colors.length];
61}
62
63// Custom color palette - Soft Pastels (converted from hex to HSL)
64const TOPIC_COLORS = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected