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