1import type { ProjectIconColor } from "@t3tools/contracts";
2
3export const PROJECT_ICON_COLORS: ReadonlyArray<{
4 readonly value: ProjectIconColor;
5 readonly label: string;
6 readonly className: string;
7 readonly swatchClassName: string;
8}> = [
9 {
10 value: "gray",
11 label: "Gray",
12 className: "text-gray-600 dark:text-gray-400",
13 swatchClassName: "bg-gray-500",
14 },
15 {
16 value: "red",
17 label: "Red",
18 className: "text-red-600 dark:text-red-400",
19 swatchClassName: "bg-red-500",
20 },
21 {
22 value: "orange",
23 label: "Orange",
24 className: "text-orange-600 dark:text-orange-400",
25 swatchClassName: "bg-orange-500",
26 },
27 {
28 value: "amber",
29 label: "Amber",
30 className: "text-amber-600 dark:text-amber-400",
31 swatchClassName: "bg-amber-500",
32 },
33 {
34 value: "yellow",
35 label: "Yellow",
36 className: "text-yellow-600 dark:text-yellow-400",
37 swatchClassName: "bg-yellow-500",
38 },
39 {
40 value: "lime",
41 label: "Lime",
42 className: "text-lime-600 dark:text-lime-400",
43 swatchClassName: "bg-lime-500",
44 },
45 {
46 value: "green",
47 label: "Green",
48 className: "text-green-600 dark:text-green-400",
49 swatchClassName: "bg-green-500",
50 },
51 {
52 value: "emerald",
53 label: "Emerald",
54 className: "text-emerald-600 dark:text-emerald-400",
55 swatchClassName: "bg-emerald-500",
56 },
57 {
58 value: "teal",
59 label: "Teal",
60 className: "text-teal-600 dark:text-teal-400",
61 swatchClassName: "bg-teal-500",
62 },
63 {
64 value: "cyan",
65 label: "Cyan",
66 className: "text-cyan-600 dark:text-cyan-400",
67 swatchClassName: "bg-cyan-500",
68 },
69 {
70 value: "sky",
71 label: "Sky",
72 className: "text-sky-600 dark:text-sky-400",
73 swatchClassName: "bg-sky-500",
74 },
75 {
76 value: "blue",
77 label: "Blue",
78 className: "text-blue-600 dark:text-blue-400",
79 swatchClassName: "bg-blue-500",
80 },
81 {
82 value: "indigo",
83 label: "Indigo",
84 className: "text-indigo-600 dark:text-indigo-400",
85 swatchClassName: "bg-indigo-500",
86 },
87 {
88 value: "violet",
89 label: "Violet",
90 className: "text-violet-600 dark:text-violet-400",
91 swatchClassName: "bg-violet-500",
92 },
93 {
94 value: "purple",
95 label: "Purple",
96 className: "text-purple-600 dark:text-purple-400",
97 swatchClassName: "bg-purple-500",
98 },
99 {
100 value: "fuchsia",
101 label: "Fuchsia",
102 className: "text-fuchsia-600 dark:text-fuchsia-400",
103 swatchClassName: "bg-fuchsia-500",
104 },
105 {
106 value: "pink",
107 label: "Pink",
108 className: "text-pink-600 dark:text-pink-400",
109 swatchClassName: "bg-pink-500",
110 },
111 {
112 value: "rose",
113 label: "Rose",
114 className: "text-rose-600 dark:text-rose-400",
115 swatchClassName: "bg-rose-500",
116 },
117];
118
119const PROJECT_ICON_COLOR_CLASSES = Object.fromEntries(
120 PROJECT_ICON_COLORS.map(({ value, className }) => [value, className]),
121) as Record<ProjectIconColor, string>;
122
123export function projectIconColorClassName(color: ProjectIconColor): string {
124 return PROJECT_ICON_COLOR_CLASSES[color];
125}