-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
71 lines (66 loc) · 1.94 KB
/
tailwind.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { colord, extend } from "colord";
import mixPlugin from "colord/plugins/mix";
import type { Config } from "tailwindcss";
extend([mixPlugin]);
const generateDarkenColorFrom = (
input: string,
percentage: number = 0.07
): string => colord(input).darken(percentage).toHex();
const generateForegroundColorFrom = (
input: string,
percentage: number = 0.8
): string =>
colord(input)
.mix(colord(input).isDark() ? "white" : "black", percentage)
.toHex();
export const tailwindColors: { [key: string]: string } = {
current: "currentColor",
transparent: "transparent",
white: "#F9F9F9",
primary: "#007BEC",
"primary-content": "#FFFFFF",
"primary-focus": generateDarkenColorFrom("#007BEC"),
secondary: "#6c5ce7",
"secondary-content": "#FFFFFF",
"secondary-focus": generateDarkenColorFrom("#6c5ce7"),
accent: "#1FB2A5",
"accent-content": "#FFFFFF",
"accent-focus": generateDarkenColorFrom("#1FB2A5"),
neutral: "#2a323c",
"neutral-content": generateForegroundColorFrom("#FFFFFF"),
"neutral-focus": generateDarkenColorFrom("#2a323c", 0.03),
"base-25": "#353d47",
"base-50": "#2a323c",
"base-75": "#20272e",
"base-100": "#1d232a",
"base-200": "#191e24",
"base-300": "#15191e",
"base-content": "#A6ADBB",
info: "#3abff8",
"info-content": generateForegroundColorFrom("#3abff8"),
success: "#36d399",
"success-content": generateForegroundColorFrom("#36d399"),
warning: "#fbbd23",
"warning-content": generateForegroundColorFrom("#fbbd23"),
error: "#f87272",
"error-content": generateForegroundColorFrom("#f87272"),
"gradient-first": "#34eaa0",
"gradient-second": "#0fa2e9",
};
const config: Config = {
content: ["./src/app/**/*.{js,ts,jsx,tsx,mdx}"],
theme: {
colors: tailwindColors,
container: {
center: true,
},
extend: {
backgroundImage: {
"hero-pattern": "url('/images/tile.svg')",
},
},
},
darkMode: "class",
plugins: [],
};
export default config;