feat: reoganizing color scheme

This commit is contained in:
Caio Cabral committed 2024-11-10 17:00:13 -05:00
1 parent 097b719159
commit 067400437f
19 files changed
+551 -416

No files matched your search

+112 -19
View File
@@ -27,34 +27,127 @@ const paletteColors = {
gray70: "#FDFDFD",
gray80: "#FDFCFD",
gray90: "#FCFCFD",
gray100: "#F4F4F4",
gray200: "#E3E3E3",
gray800: "#2D2D33",
gray830: "#262115",
gray850: "#131315",
gray860: "#111113",
gray870: "#0F0F11",
gray880: "#0C0C0E",
gray890: "#09090B",
black: "#000000",
blueBlueWave: "#1570EF",
blue700: "#475467",
green20: "#ECFDF3",
green50: "#D4F4E1",
green150: "#45BB7A",
green200: "#17B26A",
green400: "#079455",
green800: "#1C4428",
green900: "#12261E",
red50: "#F9ECED",
red100: "#FBD1D1",
red200: "#F04438",
red300: "#D32F2F",
red700: "#542426",
red800: "#301A1F",
orange50: "#FEF8EA",
orange100: "#FFECBC",
orange200: "#FEC84B",
orange300: "#FDB022",
orange400: "#FF9F00",
orange500: "#E88C30",
orange600: "#DC6803",
orange800: "#624711",
};
/* TODO Export this as colors */
/* primary: {
main: {
light:,
dark:
},
light:{
light:,
dark:
},
dark:{
light:,
dark:
},
contrastText: {
light:,
dark:
},
} */
const semanticColors = {
primary: {
main: {
light: paletteColors.blueBlueWave,
dark: paletteColors.blueBlueWave,
},
// TODO we dont have primary light, dark or contrast text
},
secondary: {
main: {
light: paletteColors.gray100,
dark: paletteColors.gray800,
},
// TODO we dont have secondary light
dark: {
light: paletteColors.gray200,
//TODO we dont have secondary dark for dark mode
},
constrastText: {
light: paletteColors.blue700,
//TODO we dont have secondary contrastText for dark mode
},
},
success: {
main: {
light: paletteColors.green200,
dark: paletteColors.green150,
},
contrastText: {
//TODO values are equal (confirm)
//TODO contrasttext semantically should be something that contrasts with the main
light: paletteColors.green400,
dark: paletteColors.green400,
},
light: {
light: paletteColors.green50,
//TODO dark mode light success is darker than the main success
dark: paletteColors.green800,
},
dark: {
light: paletteColors.green20,
dark: paletteColors.green900,
},
},
error: {
main: {
light: paletteColors.red300,
dark: paletteColors.red300,
},
contrastText: {
//TODO contrasttext semantically should be something that contrasts with the main
light: paletteColors.red200,
dark: paletteColors.red200,
},
light: {
light: paletteColors.red100,
dark: paletteColors.red700,
},
dark: {
light: paletteColors.red50,
dark: paletteColors.red800,
},
},
warning: {
main: {
light: paletteColors.orange300,
dark: paletteColors.orange400,
},
text: {
light: paletteColors.orange600,
dark: paletteColors.orange500,
},
light: {
light: paletteColors.orange100,
dark: paletteColors.orange800,
},
bg: {
light: paletteColors.orange50,
dark: paletteColors.gray830,
},
border: {
light: paletteColors.orange200,
dark: paletteColors.orange500,
},
},
gradient: {
color1: {
light: paletteColors.gray90,
+45 -36
View File
@@ -17,51 +17,43 @@ const background = {
};
const border = { light: "#27272a", dark: "#36363e" };
const { gradient } = colors;
/* const gradient = {
color1: "#09090b",
color2: "#0c0c0e",
color3: "#0f0f11",
color4: "#111113",
color5: "#131315",
}; */
const {
primary,
secondary,
success,
error,
warning,
gradient: {
color1: { dark: color1 },
color2: { dark: color2 },
color3: { dark: color3 },
color4: { dark: color4 },
color5: { dark: color5 },
},
} = colors;
const darkTheme = createTheme({
...baseTheme,
palette: {
primary: { main: "#1570ef" },
secondary: { main: "#2D2D33" },
text: text,
background: background,
border: border,
info: {
text: text.primary,
main: text.secondary,
bg: background.main,
light: background.main,
border: border.light,
},
gradient,
primary: { main: primary.main.dark },
secondary: { main: secondary.main.dark },
success: {
text: "#079455",
main: "#45bb7a",
light: "#1c4428",
bg: "#12261e",
main: success.main.dark,
contrastText: success.contrastText.dark,
light: success.light.dark,
dark: success.dark.dark,
},
error: {
text: "#f04438",
main: "#d32f2f",
light: "#542426",
bg: "#301a1f",
dark: "#932020",
border: "#f04438",
main: error.main.dark,
contrastText: error.contrastText.dark,
light: error.light.dark,
dark: error.dark.dark,
},
warning: {
text: "#e88c30",
main: "#FF9F00",
light: "#624711",
bg: "#262115",
border: "#e88c30",
main: warning.main.dark,
light: warning.light.dark,
contrastText: warning.contrastText.dark,
dark: warning.dark.dark,
},
percentage: {
uptimePoor: "#d32f2f",
@@ -78,6 +70,23 @@ const darkTheme = createTheme({
grid: "#454546",
autofill: "#2d2d33",
},
gradient: {
color1,
color2,
color3,
color4,
color5,
},
text: text,
background: background,
border: border,
info: {
text: text.primary,
main: text.secondary,
bg: background.main,
light: background.main,
border: border.light,
},
},
});
+49 -35
View File
@@ -15,52 +15,49 @@ const background = {
accent: "#f9fafb",
};
const { gradient } = colors;
/* const gradient = {
color1: "#fcfcfd",
color2: "#fdfcfd",
color3: "#fdfdfd",
color4: "#fefdfe",
color5: "#fefefe",
}; */
const border = { light: "#eaecf0", dark: "#d0d5dd" };
const {
primary,
secondary,
success,
error,
warning,
gradient: {
color1: { light: color1 },
color2: { light: color2 },
color3: { light: color3 },
color4: { light: color4 },
color5: { light: color5 },
},
} = colors;
const lightTheme = createTheme({
...baseTheme,
palette: {
primary: { main: "#1570EF" },
secondary: { main: "#F4F4F4", dark: "#e3e3e3", contrastText: "#475467" },
text: text,
background: background,
border: border,
info: {
text: text.primary,
main: text.tertiary,
bg: background.main,
light: background.main,
border: border.dark,
primary: { main: primary.main.light },
secondary: {
main: secondary.main.light,
dark: secondary.dark.light,
contrastText: secondary.constrastText.light,
},
gradient,
success: {
text: "#079455",
main: "#17b26a",
light: "#d4f4e1",
bg: "#ecfdf3",
main: success.main.light,
contrastText: success.contrastText.light,
light: success.light.light,
dark: success.dark.light,
},
error: {
text: "#f04438",
main: "#d32f2f",
light: "#fbd1d1",
bg: "#f9eced",
border: "#f04438",
main: error.main.light,
contrastText: error.contrastText.light,
light: error.light.light,
dark: error.dark.light,
},
warning: {
text: "#DC6803",
main: "#fdb022",
light: "#ffecbc",
bg: "#fef8ea",
border: "#fec84b",
main: warning.main.light,
light: warning.light.light,
contrastText: warning.contrastText.light,
dark: warning.dark.light,
},
percentage: {
uptimePoor: "#d32f2f",
@@ -77,6 +74,23 @@ const lightTheme = createTheme({
grid: "#a2a3a3",
autofill: "#e8f0fe",
},
gradient: {
color1,
color2,
color3,
color4,
color5,
},
text: text,
background: background,
border: border,
info: {
text: text.primary,
main: text.tertiary,
bg: background.main,
light: background.main,
border: border.dark,
},
},
});