feat: finishing extracting color palette
This commit is contained in:
1 parent
067400437f
commit
aa1b73c305
3 files changed
+207
-82
No files matched your search
@@ -8,7 +8,9 @@ const typographyLevels = {
|
|||||||
xl: `${(typographyBase + 10) / 16}rem`,
|
xl: `${(typographyBase + 10) / 16}rem`,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This should not be here. INcorporate into color structure */
|
/* This should not be here. Incorporate into color structure.
|
||||||
|
|
||||||
|
Is is being exported to globalStyle*/
|
||||||
const paletteLight = {
|
const paletteLight = {
|
||||||
text: {
|
text: {
|
||||||
primary: "#1c2130",
|
primary: "#1c2130",
|
||||||
@@ -19,7 +21,6 @@ const paletteLight = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* TODO Expand this */
|
/* TODO Expand this */
|
||||||
|
|
||||||
const paletteColors = {
|
const paletteColors = {
|
||||||
white: "#FFFFFF",
|
white: "#FFFFFF",
|
||||||
gray50: "#FEFEFE",
|
gray50: "#FEFEFE",
|
||||||
@@ -27,18 +28,42 @@ const paletteColors = {
|
|||||||
gray70: "#FDFDFD",
|
gray70: "#FDFDFD",
|
||||||
gray80: "#FDFCFD",
|
gray80: "#FDFCFD",
|
||||||
gray90: "#FCFCFD",
|
gray90: "#FCFCFD",
|
||||||
|
gray95: "#FAFAFA",
|
||||||
|
gray97: "#F9FAFB",
|
||||||
gray100: "#F4F4F4",
|
gray100: "#F4F4F4",
|
||||||
|
gray125: "#F2F4F7",
|
||||||
|
gray150: "#EAECF0",
|
||||||
|
gray180: "#E6E6E6",
|
||||||
gray200: "#E3E3E3",
|
gray200: "#E3E3E3",
|
||||||
|
gray225: "#D6D9DD",
|
||||||
|
gray250: "#D0D5DD",
|
||||||
|
gray300: "#A2A3A3",
|
||||||
|
gray350: "#A1A1AA",
|
||||||
|
gray450: "#8E8E8F",
|
||||||
|
gray500: "#838C99",
|
||||||
|
gray600: "#454546",
|
||||||
|
gray750: "#36363E",
|
||||||
gray800: "#2D2D33",
|
gray800: "#2D2D33",
|
||||||
|
gray815: "#27272A",
|
||||||
gray830: "#262115",
|
gray830: "#262115",
|
||||||
|
gray835: "#18181a",
|
||||||
|
gray840: "#151518",
|
||||||
gray850: "#131315",
|
gray850: "#131315",
|
||||||
gray860: "#111113",
|
gray860: "#111113",
|
||||||
gray870: "#0F0F11",
|
gray870: "#0F0F11",
|
||||||
gray880: "#0C0C0E",
|
gray880: "#0C0C0E",
|
||||||
gray890: "#09090B",
|
gray890: "#09090B",
|
||||||
black: "#000000",
|
black: "#000000",
|
||||||
|
blueGray20: "#E8F0FE",
|
||||||
|
blueGray40: "#E2EAF7",
|
||||||
|
blueGray150: "#667085",
|
||||||
|
blueGray200: "#475467",
|
||||||
|
blueGray400: "#344054",
|
||||||
|
blueGray900: "#1c2130",
|
||||||
blueBlueWave: "#1570EF",
|
blueBlueWave: "#1570EF",
|
||||||
blue700: "#475467",
|
blue700: "#4E5BA6",
|
||||||
|
purple300: "#664EFF",
|
||||||
|
purple400: "#3A1BFF",
|
||||||
green20: "#ECFDF3",
|
green20: "#ECFDF3",
|
||||||
green50: "#D4F4E1",
|
green50: "#D4F4E1",
|
||||||
green150: "#45BB7A",
|
green150: "#45BB7A",
|
||||||
@@ -54,7 +79,6 @@ const paletteColors = {
|
|||||||
red800: "#301A1F",
|
red800: "#301A1F",
|
||||||
orange50: "#FEF8EA",
|
orange50: "#FEF8EA",
|
||||||
orange100: "#FFECBC",
|
orange100: "#FFECBC",
|
||||||
orange200: "#FEC84B",
|
|
||||||
orange300: "#FDB022",
|
orange300: "#FDB022",
|
||||||
orange400: "#FF9F00",
|
orange400: "#FF9F00",
|
||||||
orange500: "#E88C30",
|
orange500: "#E88C30",
|
||||||
@@ -81,7 +105,7 @@ const semanticColors = {
|
|||||||
//TODO we dont have secondary dark for dark mode
|
//TODO we dont have secondary dark for dark mode
|
||||||
},
|
},
|
||||||
constrastText: {
|
constrastText: {
|
||||||
light: paletteColors.blue700,
|
light: paletteColors.blueGray200,
|
||||||
//TODO we dont have secondary contrastText for dark mode
|
//TODO we dont have secondary contrastText for dark mode
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -114,7 +138,7 @@ const semanticColors = {
|
|||||||
contrastText: {
|
contrastText: {
|
||||||
//TODO contrasttext semantically should be something that contrasts with the main
|
//TODO contrasttext semantically should be something that contrasts with the main
|
||||||
light: paletteColors.red200,
|
light: paletteColors.red200,
|
||||||
dark: paletteColors.red200,
|
dark: paletteColors.red50,
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
light: paletteColors.red100,
|
light: paletteColors.red100,
|
||||||
@@ -130,24 +154,20 @@ const semanticColors = {
|
|||||||
light: paletteColors.orange300,
|
light: paletteColors.orange300,
|
||||||
dark: paletteColors.orange400,
|
dark: paletteColors.orange400,
|
||||||
},
|
},
|
||||||
text: {
|
|
||||||
light: paletteColors.orange600,
|
|
||||||
dark: paletteColors.orange500,
|
|
||||||
},
|
|
||||||
light: {
|
light: {
|
||||||
light: paletteColors.orange100,
|
light: paletteColors.orange100,
|
||||||
dark: paletteColors.orange800,
|
dark: paletteColors.orange800,
|
||||||
},
|
},
|
||||||
bg: {
|
contrastText: {
|
||||||
|
light: paletteColors.orange600,
|
||||||
|
dark: paletteColors.orange500,
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
light: paletteColors.orange50,
|
light: paletteColors.orange50,
|
||||||
dark: paletteColors.gray830,
|
dark: paletteColors.gray830,
|
||||||
},
|
},
|
||||||
border: {
|
|
||||||
light: paletteColors.orange200,
|
|
||||||
dark: paletteColors.orange500,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
/* From this part on, try to create semantic structure, not feature based structure */
|
||||||
gradient: {
|
gradient: {
|
||||||
color1: {
|
color1: {
|
||||||
light: paletteColors.gray90,
|
light: paletteColors.gray90,
|
||||||
@@ -170,5 +190,85 @@ const semanticColors = {
|
|||||||
dark: paletteColors.gray850,
|
dark: paletteColors.gray850,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
background: {
|
||||||
|
main: {
|
||||||
|
light: paletteColors.white,
|
||||||
|
dark: paletteColors.gray840,
|
||||||
|
},
|
||||||
|
alt: {
|
||||||
|
light: paletteColors.gray90,
|
||||||
|
dark: paletteColors.gray890,
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
light: paletteColors.gray100,
|
||||||
|
dark: paletteColors.gray800,
|
||||||
|
},
|
||||||
|
accent: {
|
||||||
|
light: paletteColors.gray97,
|
||||||
|
dark: paletteColors.gray835,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
primary: {
|
||||||
|
light: paletteColors.blueGray900,
|
||||||
|
dark: paletteColors.gray95,
|
||||||
|
},
|
||||||
|
secondary: {
|
||||||
|
light: paletteColors.blueGray400,
|
||||||
|
dark: paletteColors.gray180,
|
||||||
|
},
|
||||||
|
tertiary: {
|
||||||
|
light: paletteColors.blueGray200,
|
||||||
|
dark: paletteColors.gray350,
|
||||||
|
},
|
||||||
|
accent: {
|
||||||
|
light: paletteColors.gray500,
|
||||||
|
dark: paletteColors.gray450,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
light: {
|
||||||
|
light: paletteColors.gray150,
|
||||||
|
dark: paletteColors.gray815,
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
light: paletteColors.gray250,
|
||||||
|
dark: paletteColors.gray750,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
percentage: {
|
||||||
|
/* uptimeFair: {
|
||||||
|
light: paletteColors.
|
||||||
|
} */
|
||||||
|
},
|
||||||
|
unresolved: {
|
||||||
|
main: {
|
||||||
|
light: paletteColors.blue700,
|
||||||
|
dark: paletteColors.purple300,
|
||||||
|
},
|
||||||
|
light: {
|
||||||
|
light: paletteColors.blueGray40,
|
||||||
|
dark: paletteColors.purple400,
|
||||||
|
},
|
||||||
|
bg: {
|
||||||
|
light: paletteColors.gray125,
|
||||||
|
dark: paletteColors.gray125,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
other: {
|
||||||
|
icon: {
|
||||||
|
light: paletteColors.blueGray150,
|
||||||
|
},
|
||||||
|
line: {
|
||||||
|
light: paletteColors.gray225,
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
light: paletteColors.gray300,
|
||||||
|
dark: paletteColors.gray600,
|
||||||
|
},
|
||||||
|
autofill: {
|
||||||
|
light: paletteColors.blueGray20,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
export { typographyLevels, paletteLight, semanticColors as colors };
|
export { typographyLevels, paletteLight, semanticColors as colors };
|
||||||
@@ -2,21 +2,6 @@ import { createTheme } from "@mui/material";
|
|||||||
import { baseTheme } from "./globalTheme";
|
import { baseTheme } from "./globalTheme";
|
||||||
import { colors } from "./constants";
|
import { colors } from "./constants";
|
||||||
|
|
||||||
const text = {
|
|
||||||
primary: "#fafafa",
|
|
||||||
secondary: "#e6e6e6",
|
|
||||||
tertiary: "#a1a1aa",
|
|
||||||
accent: "#8e8e8f",
|
|
||||||
disabled: "rgba(172, 172, 172, 0.3)",
|
|
||||||
};
|
|
||||||
const background = {
|
|
||||||
main: "#151518",
|
|
||||||
alt: "#09090b",
|
|
||||||
fill: "#2D2D33",
|
|
||||||
accent: "#18181a",
|
|
||||||
};
|
|
||||||
const border = { light: "#27272a", dark: "#36363e" };
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
primary,
|
primary,
|
||||||
secondary,
|
secondary,
|
||||||
@@ -30,6 +15,11 @@ const {
|
|||||||
color4: { dark: color4 },
|
color4: { dark: color4 },
|
||||||
color5: { dark: color5 },
|
color5: { dark: color5 },
|
||||||
},
|
},
|
||||||
|
background,
|
||||||
|
text,
|
||||||
|
border,
|
||||||
|
unresolved,
|
||||||
|
other,
|
||||||
} = colors;
|
} = colors;
|
||||||
|
|
||||||
const darkTheme = createTheme({
|
const darkTheme = createTheme({
|
||||||
@@ -55,20 +45,25 @@ const darkTheme = createTheme({
|
|||||||
contrastText: warning.contrastText.dark,
|
contrastText: warning.contrastText.dark,
|
||||||
dark: warning.dark.dark,
|
dark: warning.dark.dark,
|
||||||
},
|
},
|
||||||
|
/* From this part on, try to create semantic structure, not feature based structure */
|
||||||
percentage: {
|
percentage: {
|
||||||
uptimePoor: "#d32f2f",
|
uptimePoor: error.main.dark,
|
||||||
uptimeFair: "#e88c30",
|
uptimeFair: warning.contrastText.dark,
|
||||||
uptimeGood: "#ffd600",
|
uptimeGood: warning.main.dark /* Change for a success color? ?*/,
|
||||||
uptimeExcellent: "#079455",
|
uptimeExcellent: success.contrastText.light,
|
||||||
},
|
},
|
||||||
unresolved: { main: "#664eff", light: "#3a1bff", bg: "#f2f4f7" },
|
unresolved: {
|
||||||
divider: border.light,
|
main: unresolved.main.dark,
|
||||||
|
light: unresolved.light.dark,
|
||||||
|
bg: unresolved.bg.dark,
|
||||||
|
},
|
||||||
|
divider: border.light.dark,
|
||||||
other: {
|
other: {
|
||||||
icon: "#e6e6e6",
|
icon: text.secondary.dark,
|
||||||
line: "#27272a",
|
line: border.light.dark,
|
||||||
fill: "#18181a",
|
fill: background.accent.dark,
|
||||||
grid: "#454546",
|
grid: other.grid.dark,
|
||||||
autofill: "#2d2d33",
|
autofill: secondary.main.dark,
|
||||||
},
|
},
|
||||||
gradient: {
|
gradient: {
|
||||||
color1,
|
color1,
|
||||||
@@ -77,15 +72,28 @@ const darkTheme = createTheme({
|
|||||||
color4,
|
color4,
|
||||||
color5,
|
color5,
|
||||||
},
|
},
|
||||||
text: text,
|
text: {
|
||||||
background: background,
|
primary: text.primary.dark,
|
||||||
border: border,
|
secondary: text.secondary.dark,
|
||||||
|
tertiary: text.tertiary.dark,
|
||||||
|
accent: text.accent.dark,
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
main: background.main.dark,
|
||||||
|
alt: background.alt.dark,
|
||||||
|
fill: background.fill.dark,
|
||||||
|
accent: background.accent.dark,
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
light: border.light.dark,
|
||||||
|
dark: border.dark.dark,
|
||||||
|
},
|
||||||
info: {
|
info: {
|
||||||
text: text.primary,
|
text: text.primary.dark,
|
||||||
main: text.secondary,
|
main: text.secondary.dark,
|
||||||
bg: background.main,
|
bg: background.main.dark,
|
||||||
light: background.main,
|
light: background.main.dark,
|
||||||
border: border.light,
|
border: border.light.dark,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,20 +2,14 @@ import { createTheme } from "@mui/material";
|
|||||||
import { baseTheme } from "./globalTheme";
|
import { baseTheme } from "./globalTheme";
|
||||||
import { colors } from "./constants";
|
import { colors } from "./constants";
|
||||||
|
|
||||||
const text = {
|
/*
|
||||||
primary: "#1c2130",
|
Take things from global theme
|
||||||
secondary: "#344054",
|
|
||||||
tertiary: "#475467",
|
|
||||||
accent: "#838c99",
|
|
||||||
};
|
|
||||||
const background = {
|
|
||||||
main: "#FFFFFF",
|
|
||||||
alt: "#FCFCFD",
|
|
||||||
fill: "#F4F4F4",
|
|
||||||
accent: "#f9fafb",
|
|
||||||
};
|
|
||||||
|
|
||||||
const border = { light: "#eaecf0", dark: "#d0d5dd" };
|
Next step: check if all here are being used.
|
||||||
|
|
||||||
|
Discuss colors with Gorkem and rest of the team
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
const {
|
const {
|
||||||
primary,
|
primary,
|
||||||
@@ -30,6 +24,11 @@ const {
|
|||||||
color4: { light: color4 },
|
color4: { light: color4 },
|
||||||
color5: { light: color5 },
|
color5: { light: color5 },
|
||||||
},
|
},
|
||||||
|
background,
|
||||||
|
text,
|
||||||
|
border,
|
||||||
|
unresolved,
|
||||||
|
other,
|
||||||
} = colors;
|
} = colors;
|
||||||
|
|
||||||
const lightTheme = createTheme({
|
const lightTheme = createTheme({
|
||||||
@@ -59,20 +58,25 @@ const lightTheme = createTheme({
|
|||||||
contrastText: warning.contrastText.light,
|
contrastText: warning.contrastText.light,
|
||||||
dark: warning.dark.light,
|
dark: warning.dark.light,
|
||||||
},
|
},
|
||||||
|
/* From this part on, try to create semantic structure, not feature based structure */
|
||||||
percentage: {
|
percentage: {
|
||||||
uptimePoor: "#d32f2f",
|
uptimePoor: error.main.light,
|
||||||
uptimeFair: "#ec8013",
|
uptimeFair: warning.contrastText.light,
|
||||||
uptimeGood: "#ffb800",
|
uptimeGood: warning.main.light /* Change for a success color? */,
|
||||||
uptimeExcellent: "#079455",
|
uptimeExcellent: success.contrastText.light,
|
||||||
},
|
},
|
||||||
unresolved: { main: "#4e5ba6", light: "#e2eaf7", bg: "#f2f4f7" },
|
unresolved: {
|
||||||
divider: border.light,
|
main: unresolved.main.light,
|
||||||
|
light: unresolved.light.light,
|
||||||
|
bg: unresolved.bg.light,
|
||||||
|
},
|
||||||
|
divider: border.light.light,
|
||||||
other: {
|
other: {
|
||||||
icon: "#667085",
|
icon: other.icon.light,
|
||||||
line: "#d6d9dd",
|
line: other.line.light,
|
||||||
fill: "#e3e3e3",
|
fill: secondary.dark.light,
|
||||||
grid: "#a2a3a3",
|
grid: other.grid.light,
|
||||||
autofill: "#e8f0fe",
|
autofill: other.autofill.light,
|
||||||
},
|
},
|
||||||
gradient: {
|
gradient: {
|
||||||
color1,
|
color1,
|
||||||
@@ -81,15 +85,28 @@ const lightTheme = createTheme({
|
|||||||
color4,
|
color4,
|
||||||
color5,
|
color5,
|
||||||
},
|
},
|
||||||
text: text,
|
text: {
|
||||||
background: background,
|
primary: text.primary.light,
|
||||||
border: border,
|
secondary: text.secondary.light,
|
||||||
|
tertiary: text.tertiary.light,
|
||||||
|
accent: text.accent.light,
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
main: background.main.light,
|
||||||
|
alt: background.alt.light,
|
||||||
|
fill: background.fill.light,
|
||||||
|
accent: background.accent.light,
|
||||||
|
},
|
||||||
|
border: {
|
||||||
|
light: border.light.light,
|
||||||
|
dark: border.dark.light,
|
||||||
|
},
|
||||||
info: {
|
info: {
|
||||||
text: text.primary,
|
text: text.primary.light,
|
||||||
main: text.tertiary,
|
main: text.tertiary.light,
|
||||||
bg: background.main,
|
bg: background.main.light,
|
||||||
light: background.main,
|
light: background.main.light,
|
||||||
border: border.dark,
|
border: border.dark.light,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user