Skip to content

Instantly share code, notes, and snippets.

@tgroshon
Last active January 26, 2024 13:41
Show Gist options
  • Save tgroshon/732485f31b507e88bb99a70e495f563f to your computer and use it in GitHub Desktop.
Save tgroshon/732485f31b507e88bb99a70e495f563f to your computer and use it in GitHub Desktop.
Tailwind CSS GIMP Color Palette
// Execute with "bun run index.ts > tailwind.gpl"
//
import colors from 'tailwindcss/colors'
type RGB = {r: number, g: number, b: number};
function isObj(data: any): data is object {
return data !== null && typeof data === 'object' && !Array.isArray(data)
}
function hexToRgb(hexColor: string): RGB {
return {
r: parseInt(hexColor.charAt(1) + hexColor.charAt(2), 16),
g: parseInt(hexColor.charAt(3) + hexColor.charAt(4), 16),
b: parseInt(hexColor.charAt(5) + hexColor.charAt(6), 16),
};
}
const COLORS_TO_SKIP = new Set([
'lightBlue',
'warmGray',
'trueGray',
'coolGray',
'blueGray'
]);
function main() {
console.log("GIMP Palette")
console.log("Name: Tailwind CSS")
console.log("Columns: 3")
for (const [name, data] of Object.entries(colors)) {
if (!COLORS_TO_SKIP.has(name) && isObj(data)) {
for (const [shade, value] of Object.entries(data)) {
const rgb = hexToRgb(value);
console.log(`${rgb.r}\t${rgb.g}\t${rgb.b}\t${name} ${shade} (${value})`);
}
}
}
}
main();
{
"name": "tailwind_palette_gen",
"module": "index.ts",
"type": "module",
"devDependencies": {
"bun-types": "latest",
"tailwindcss": "^3.3.3"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}
GIMP Palette
Name: Tailwind CSS
Columns: 3
#
# DESCRIPTION:
# A palette of the default Tailwind CSS colors in GIMP Palette format.
#
# AUTHORS:
# Tailwind Labs
#
# CONTRIBUTING AUTHORS:
# Tom Groshong Jr. <[email protected]>
#
248 250 252 slate 50 (#f8fafc)
241 245 249 slate 100 (#f1f5f9)
226 232 240 slate 200 (#e2e8f0)
203 213 225 slate 300 (#cbd5e1)
148 163 184 slate 400 (#94a3b8)
100 116 139 slate 500 (#64748b)
71 85 105 slate 600 (#475569)
51 65 85 slate 700 (#334155)
30 41 59 slate 800 (#1e293b)
15 23 42 slate 900 (#0f172a)
2 6 23 slate 950 (#020617)
249 250 251 gray 50 (#f9fafb)
243 244 246 gray 100 (#f3f4f6)
229 231 235 gray 200 (#e5e7eb)
209 213 219 gray 300 (#d1d5db)
156 163 175 gray 400 (#9ca3af)
107 114 128 gray 500 (#6b7280)
75 85 99 gray 600 (#4b5563)
55 65 81 gray 700 (#374151)
31 41 55 gray 800 (#1f2937)
17 24 39 gray 900 (#111827)
3 7 18 gray 950 (#030712)
250 250 250 zinc 50 (#fafafa)
244 244 245 zinc 100 (#f4f4f5)
228 228 231 zinc 200 (#e4e4e7)
212 212 216 zinc 300 (#d4d4d8)
161 161 170 zinc 400 (#a1a1aa)
113 113 122 zinc 500 (#71717a)
82 82 91 zinc 600 (#52525b)
63 63 70 zinc 700 (#3f3f46)
39 39 42 zinc 800 (#27272a)
24 24 27 zinc 900 (#18181b)
9 9 11 zinc 950 (#09090b)
250 250 250 neutral 50 (#fafafa)
245 245 245 neutral 100 (#f5f5f5)
229 229 229 neutral 200 (#e5e5e5)
212 212 212 neutral 300 (#d4d4d4)
163 163 163 neutral 400 (#a3a3a3)
115 115 115 neutral 500 (#737373)
82 82 82 neutral 600 (#525252)
64 64 64 neutral 700 (#404040)
38 38 38 neutral 800 (#262626)
23 23 23 neutral 900 (#171717)
10 10 10 neutral 950 (#0a0a0a)
250 250 249 stone 50 (#fafaf9)
245 245 244 stone 100 (#f5f5f4)
231 229 228 stone 200 (#e7e5e4)
214 211 209 stone 300 (#d6d3d1)
168 162 158 stone 400 (#a8a29e)
120 113 108 stone 500 (#78716c)
87 83 78 stone 600 (#57534e)
68 64 60 stone 700 (#44403c)
41 37 36 stone 800 (#292524)
28 25 23 stone 900 (#1c1917)
12 10 9 stone 950 (#0c0a09)
254 242 242 red 50 (#fef2f2)
254 226 226 red 100 (#fee2e2)
254 202 202 red 200 (#fecaca)
252 165 165 red 300 (#fca5a5)
248 113 113 red 400 (#f87171)
239 68 68 red 500 (#ef4444)
220 38 38 red 600 (#dc2626)
185 28 28 red 700 (#b91c1c)
153 27 27 red 800 (#991b1b)
127 29 29 red 900 (#7f1d1d)
69 10 10 red 950 (#450a0a)
255 247 237 orange 50 (#fff7ed)
255 237 213 orange 100 (#ffedd5)
254 215 170 orange 200 (#fed7aa)
253 186 116 orange 300 (#fdba74)
251 146 60 orange 400 (#fb923c)
249 115 22 orange 500 (#f97316)
234 88 12 orange 600 (#ea580c)
194 65 12 orange 700 (#c2410c)
154 52 18 orange 800 (#9a3412)
124 45 18 orange 900 (#7c2d12)
67 20 7 orange 950 (#431407)
255 251 235 amber 50 (#fffbeb)
254 243 199 amber 100 (#fef3c7)
253 230 138 amber 200 (#fde68a)
252 211 77 amber 300 (#fcd34d)
251 191 36 amber 400 (#fbbf24)
245 158 11 amber 500 (#f59e0b)
217 119 6 amber 600 (#d97706)
180 83 9 amber 700 (#b45309)
146 64 14 amber 800 (#92400e)
120 53 15 amber 900 (#78350f)
69 26 3 amber 950 (#451a03)
254 252 232 yellow 50 (#fefce8)
254 249 195 yellow 100 (#fef9c3)
254 240 138 yellow 200 (#fef08a)
253 224 71 yellow 300 (#fde047)
250 204 21 yellow 400 (#facc15)
234 179 8 yellow 500 (#eab308)
202 138 4 yellow 600 (#ca8a04)
161 98 7 yellow 700 (#a16207)
133 77 14 yellow 800 (#854d0e)
113 63 18 yellow 900 (#713f12)
66 32 6 yellow 950 (#422006)
247 254 231 lime 50 (#f7fee7)
236 252 203 lime 100 (#ecfccb)
217 249 157 lime 200 (#d9f99d)
190 242 100 lime 300 (#bef264)
163 230 53 lime 400 (#a3e635)
132 204 22 lime 500 (#84cc16)
101 163 13 lime 600 (#65a30d)
77 124 15 lime 700 (#4d7c0f)
63 98 18 lime 800 (#3f6212)
54 83 20 lime 900 (#365314)
26 46 5 lime 950 (#1a2e05)
240 253 244 green 50 (#f0fdf4)
220 252 231 green 100 (#dcfce7)
187 247 208 green 200 (#bbf7d0)
134 239 172 green 300 (#86efac)
74 222 128 green 400 (#4ade80)
34 197 94 green 500 (#22c55e)
22 163 74 green 600 (#16a34a)
21 128 61 green 700 (#15803d)
22 101 52 green 800 (#166534)
20 83 45 green 900 (#14532d)
5 46 22 green 950 (#052e16)
236 253 245 emerald 50 (#ecfdf5)
209 250 229 emerald 100 (#d1fae5)
167 243 208 emerald 200 (#a7f3d0)
110 231 183 emerald 300 (#6ee7b7)
52 211 153 emerald 400 (#34d399)
16 185 129 emerald 500 (#10b981)
5 150 105 emerald 600 (#059669)
4 120 87 emerald 700 (#047857)
6 95 70 emerald 800 (#065f46)
6 78 59 emerald 900 (#064e3b)
2 44 34 emerald 950 (#022c22)
240 253 250 teal 50 (#f0fdfa)
204 251 241 teal 100 (#ccfbf1)
153 246 228 teal 200 (#99f6e4)
94 234 212 teal 300 (#5eead4)
45 212 191 teal 400 (#2dd4bf)
20 184 166 teal 500 (#14b8a6)
13 148 136 teal 600 (#0d9488)
15 118 110 teal 700 (#0f766e)
17 94 89 teal 800 (#115e59)
19 78 74 teal 900 (#134e4a)
4 47 46 teal 950 (#042f2e)
236 254 255 cyan 50 (#ecfeff)
207 250 254 cyan 100 (#cffafe)
165 243 252 cyan 200 (#a5f3fc)
103 232 249 cyan 300 (#67e8f9)
34 211 238 cyan 400 (#22d3ee)
6 182 212 cyan 500 (#06b6d4)
8 145 178 cyan 600 (#0891b2)
14 116 144 cyan 700 (#0e7490)
21 94 117 cyan 800 (#155e75)
22 78 99 cyan 900 (#164e63)
8 51 68 cyan 950 (#083344)
240 249 255 sky 50 (#f0f9ff)
224 242 254 sky 100 (#e0f2fe)
186 230 253 sky 200 (#bae6fd)
125 211 252 sky 300 (#7dd3fc)
56 189 248 sky 400 (#38bdf8)
14 165 233 sky 500 (#0ea5e9)
2 132 199 sky 600 (#0284c7)
3 105 161 sky 700 (#0369a1)
7 89 133 sky 800 (#075985)
12 74 110 sky 900 (#0c4a6e)
8 47 73 sky 950 (#082f49)
239 246 255 blue 50 (#eff6ff)
219 234 254 blue 100 (#dbeafe)
191 219 254 blue 200 (#bfdbfe)
147 197 253 blue 300 (#93c5fd)
96 165 250 blue 400 (#60a5fa)
59 130 246 blue 500 (#3b82f6)
37 99 235 blue 600 (#2563eb)
29 78 216 blue 700 (#1d4ed8)
30 64 175 blue 800 (#1e40af)
30 58 138 blue 900 (#1e3a8a)
23 37 84 blue 950 (#172554)
238 242 255 indigo 50 (#eef2ff)
224 231 255 indigo 100 (#e0e7ff)
199 210 254 indigo 200 (#c7d2fe)
165 180 252 indigo 300 (#a5b4fc)
129 140 248 indigo 400 (#818cf8)
99 102 241 indigo 500 (#6366f1)
79 70 229 indigo 600 (#4f46e5)
67 56 202 indigo 700 (#4338ca)
55 48 163 indigo 800 (#3730a3)
49 46 129 indigo 900 (#312e81)
30 27 75 indigo 950 (#1e1b4b)
245 243 255 violet 50 (#f5f3ff)
237 233 254 violet 100 (#ede9fe)
221 214 254 violet 200 (#ddd6fe)
196 181 253 violet 300 (#c4b5fd)
167 139 250 violet 400 (#a78bfa)
139 92 246 violet 500 (#8b5cf6)
124 58 237 violet 600 (#7c3aed)
109 40 217 violet 700 (#6d28d9)
91 33 182 violet 800 (#5b21b6)
76 29 149 violet 900 (#4c1d95)
46 16 101 violet 950 (#2e1065)
250 245 255 purple 50 (#faf5ff)
243 232 255 purple 100 (#f3e8ff)
233 213 255 purple 200 (#e9d5ff)
216 180 254 purple 300 (#d8b4fe)
192 132 252 purple 400 (#c084fc)
168 85 247 purple 500 (#a855f7)
147 51 234 purple 600 (#9333ea)
126 34 206 purple 700 (#7e22ce)
107 33 168 purple 800 (#6b21a8)
88 28 135 purple 900 (#581c87)
59 7 100 purple 950 (#3b0764)
253 244 255 fuchsia 50 (#fdf4ff)
250 232 255 fuchsia 100 (#fae8ff)
245 208 254 fuchsia 200 (#f5d0fe)
240 171 252 fuchsia 300 (#f0abfc)
232 121 249 fuchsia 400 (#e879f9)
217 70 239 fuchsia 500 (#d946ef)
192 38 211 fuchsia 600 (#c026d3)
162 28 175 fuchsia 700 (#a21caf)
134 25 143 fuchsia 800 (#86198f)
112 26 117 fuchsia 900 (#701a75)
74 4 78 fuchsia 950 (#4a044e)
253 242 248 pink 50 (#fdf2f8)
252 231 243 pink 100 (#fce7f3)
251 207 232 pink 200 (#fbcfe8)
249 168 212 pink 300 (#f9a8d4)
244 114 182 pink 400 (#f472b6)
236 72 153 pink 500 (#ec4899)
219 39 119 pink 600 (#db2777)
190 24 93 pink 700 (#be185d)
157 23 77 pink 800 (#9d174d)
131 24 67 pink 900 (#831843)
80 7 36 pink 950 (#500724)
255 241 242 rose 50 (#fff1f2)
255 228 230 rose 100 (#ffe4e6)
254 205 211 rose 200 (#fecdd3)
253 164 175 rose 300 (#fda4af)
251 113 133 rose 400 (#fb7185)
244 63 94 rose 500 (#f43f5e)
225 29 72 rose 600 (#e11d48)
190 18 60 rose 700 (#be123c)
159 18 57 rose 800 (#9f1239)
136 19 55 rose 900 (#881337)
76 5 25 rose 950 (#4c0519)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment