MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getColor

Function getColor

packages/utilities/src/colors.ts:25–81  ·  view source on GitHub ↗
(character: string)

Source from the content-addressed store, hash-verified

23// Ł, Ż etc. are not supported yet
24
25export function getColor(character: string): string | null {
26 switch (character) {
27 case 'a':
28 return 'red';
29 case 'b':
30 return 'magenta';
31 case 'c':
32 return 'purple';
33 case 'd':
34 return 'indigo';
35 case 'e':
36 return 'blue';
37 case 'f':
38 return 'cyan';
39 case 'g':
40 return 'teal';
41 case 'h':
42 return 'green';
43 case 'i':
44 return 'lime';
45 case 'j':
46 return 'mustard';
47 case 'k':
48 return 'orange';
49 case 'l':
50 return 'brown';
51 case 'm':
52 return 'red';
53 case 'n':
54 return 'magenta';
55 case 'o':
56 return 'purple';
57 case 'p':
58 return 'indigo';
59 case 'q':
60 return 'blue';
61 case 'r':
62 return 'cyan';
63 case 's':
64 return 'teal';
65 case 't':
66 return 'green';
67 case 'u':
68 return 'lime';
69 case 'v':
70 return 'mustard';
71 case 'w':
72 return 'orange';
73 case 'x':
74 return 'brown';
75 case 'y':
76 return 'red';
77 case 'z':
78 return 'magenta';
79 }
80 return null;
81}

Callers 3

TextAvatarFunction · 0.90
SymbolFunction · 0.90
EmojiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected