Files
Checkmate/Client/src/Utils/Theme/constants.js
T

239 lines
4.9 KiB
JavaScript
Raw Normal View History

const typographyBase = 14;
2024-11-13 06:08:58 -05:00
/* TODO
Check for px in codebase. All font sizes should be in REM and should live here.
Rest should be checked on each case
*/
const typographyLevels = {
base: typographyBase,
xs: `${(typographyBase - 4) / 16}rem`,
s: `${(typographyBase - 2) / 16}rem`,
m: `${typographyBase / 16}rem`,
l: `${(typographyBase + 2) / 16}rem`,
xl: `${(typographyBase + 10) / 16}rem`,
};
/* TODO Review color palette and semantic colors */
const paletteColors = {
white: "#FFFFFF",
gray50: "#FEFEFE",
gray60: "#FEFDFE",
gray70: "#FDFDFD",
gray80: "#FDFCFD",
gray90: "#FCFCFD",
2024-11-10 17:00:13 -05:00
gray100: "#F4F4F4",
2024-11-27 14:50:05 +08:00
gray150: "#EFEFEF",
2024-11-10 17:00:13 -05:00
gray200: "#E3E3E3",
2024-11-12 09:54:19 -05:00
gray300: "#A2A3A3",
gray500: "#838C99",
gray600: "#454546",
gray750: "#36363E",
2024-11-10 17:00:13 -05:00
gray800: "#2D2D33",
gray850: "#131315",
gray860: "#111113",
gray870: "#0F0F11",
gray880: "#0C0C0E",
gray890: "#09090B",
2024-11-12 09:54:19 -05:00
blueGray20: "#E8F0FE",
blueGray150: "#667085",
blueGray200: "#475467",
blueGray400: "#344054",
blueGray900: "#1c2130",
2024-11-10 17:00:13 -05:00
blueBlueWave: "#1570EF",
2024-11-12 09:54:19 -05:00
blue700: "#4E5BA6",
purple300: "#664EFF",
purple400: "#3A1BFF",
2024-11-10 17:00:13 -05:00
green50: "#D4F4E1",
green150: "#45BB7A",
green400: "#079455",
green500: "#07B467",
2024-11-10 17:00:13 -05:00
green800: "#1C4428",
green900: "#12261E",
red50: "#F9ECED",
red100: "#FBD1D1",
red200: "#F04438",
red300: "#D32F2F",
red700: "#542426",
2024-12-26 08:22:55 +00:00
red800: "#912018",
2024-11-10 17:00:13 -05:00
orange50: "#FEF8EA",
orange100: "#FFECBC",
orange300: "#FDB022",
orange400: "#FF9F00",
orange500: "#E88C30",
orange600: "#DC6803",
orange800: "#624711",
};
const semanticColors = {
2024-11-12 09:54:19 -05:00
unresolved: {
main: {
light: paletteColors.blue700,
dark: paletteColors.purple300,
},
light: {
light: paletteColors.blueGray20,
2024-11-12 09:54:19 -05:00
dark: paletteColors.purple400,
},
bg: {
light: paletteColors.gray100,
dark: paletteColors.gray100,
2024-11-12 09:54:19 -05:00
},
},
};
2025-01-07 21:27:52 -05:00
const newColors = {
offWhite: "#FEFEFE",
offBlack: "#131315",
2025-01-14 18:54:00 -05:00
gray100: "#F3F3F3",
gray200: "#EFEFEF",
2025-01-08 21:41:59 -05:00
gray500: "#A2A3A3",
2025-01-07 21:27:52 -05:00
blueGray50: "#E8F0FE",
blueGray500: "#475467",
blueGray600: "#344054",
blueGray800: "#1C2130",
blueBlueWave: "#1570EF",
2025-01-11 16:40:07 -05:00
/* I changed green 100 and green 700. Need to change red and warning as well, and refactor the object following the structure */
2025-01-11 11:53:35 -05:00
green100: "#67cd78",
2025-01-07 21:27:52 -05:00
green200: "#4B9B77",
green400: "#079455",
2025-01-11 11:49:02 -05:00
green700: "#026513",
2025-01-12 12:28:13 -05:00
orange100: "#FD8F22",
orange200: "#D69A5D",
2025-01-07 21:27:52 -05:00
orange600: "#9B734B",
2025-01-12 12:28:13 -05:00
orange700: "#884605",
2025-01-12 09:39:31 -05:00
red100: "#F27C7C",
2025-01-07 21:27:52 -05:00
red400: "#D92020",
red600: "#9B4B4B",
2025-01-12 09:39:31 -05:00
red700: "#980303",
2025-01-07 21:27:52 -05:00
};
2025-01-12 12:28:13 -05:00
/*
Structure:
2025-01-11 16:40:07 -05:00
main: background color
contrastText: color for main contrast text
2025-01-12 09:39:31 -05:00
contrastTextSecondary: if needed
contrastTextTertiary: if needed
2025-01-11 16:40:07 -05:00
lowContrast: if we need some low contrast for that color (for borders, and decorative elements). This should never be usend in text
*/
2025-01-07 21:27:52 -05:00
const newSemanticColors = {
accent: {
main: {
light: newColors.blueBlueWave,
dark: newColors.blueBlueWave,
},
contrastText: {
light: newColors.offWhite,
dark: newColors.offWhite,
},
},
primary: {
main: {
light: newColors.offWhite,
dark: newColors.offBlack,
},
contrastText: {
2025-01-12 09:39:31 -05:00
light: newColors.blueGray800,
dark: newColors.blueGray50,
},
contrastTextSecondary: {
light: newColors.blueGray600,
dark: newColors.gray200,
},
contrastTextTertiary: {
light: newColors.blueGray500,
dark: newColors.gray500,
2025-01-07 21:27:52 -05:00
},
2025-01-08 21:41:59 -05:00
lowContrast: {
light: newColors.gray200,
dark: newColors.blueGray600,
},
2025-01-07 21:27:52 -05:00
},
2025-01-09 08:40:25 -05:00
secondary: {
main: {
2025-01-11 09:53:27 -05:00
light: newColors.gray200,
2025-01-09 12:19:28 -05:00
dark: newColors.blueGray600,
2025-01-09 08:40:25 -05:00
},
contrastText: {
light: newColors.blueGray600,
dark: newColors.gray200,
},
},
2025-01-11 09:53:27 -05:00
tertiary: {
main: {
light: newColors.gray100,
dark: newColors.blueGray800,
},
contrastText: {
light: newColors.blueGray800,
dark: newColors.gray100,
},
},
2025-01-07 21:27:52 -05:00
success: {
main: {
light: newColors.green700,
dark: newColors.green100,
},
contrastText: {
2025-01-12 09:39:31 -05:00
light: newColors.offWhite,
dark: newColors.offBlack,
2025-01-07 21:27:52 -05:00
},
2025-01-12 09:39:31 -05:00
lowContrast: {
2025-01-07 21:27:52 -05:00
light: newColors.green400,
dark: newColors.green200,
},
},
2025-01-12 09:39:31 -05:00
warning: {
2025-01-07 21:27:52 -05:00
main: {
2025-01-12 09:39:31 -05:00
light: newColors.orange700,
2025-01-12 12:28:13 -05:00
dark: newColors.orange200,
2025-01-07 21:27:52 -05:00
},
contrastText: {
2025-01-12 09:39:31 -05:00
light: newColors.offWhite,
dark: newColors.offBlack,
2025-01-07 21:27:52 -05:00
},
2025-01-12 09:39:31 -05:00
lowContrast: {
2025-01-12 12:28:13 -05:00
light: newColors.orange100,
2025-01-12 09:39:31 -05:00
dark: newColors.orange600,
2025-01-07 21:27:52 -05:00
},
},
2025-01-12 09:39:31 -05:00
error: {
2025-01-07 21:27:52 -05:00
main: {
2025-01-12 09:39:31 -05:00
light: newColors.red700,
dark: newColors.red100,
2025-01-07 21:27:52 -05:00
},
contrastText: {
2025-01-12 09:39:31 -05:00
light: newColors.offWhite,
dark: newColors.offBlack,
2025-01-07 21:27:52 -05:00
},
2025-01-12 09:39:31 -05:00
lowContrast: {
light: newColors.red400,
dark: newColors.red600,
2025-01-07 21:27:52 -05:00
},
},
2025-01-09 08:40:25 -05:00
/* These are temporary, just for everything not to break */
2025-01-07 21:27:52 -05:00
gradient: {
color1: {
light: paletteColors.gray90,
dark: paletteColors.gray890,
},
color2: {
light: paletteColors.gray80,
dark: paletteColors.gray880,
},
color3: {
light: paletteColors.gray70,
dark: paletteColors.gray870,
},
color4: {
light: paletteColors.gray60,
dark: paletteColors.gray860,
},
color5: {
light: paletteColors.gray50,
dark: paletteColors.gray850,
},
},
};
export { typographyLevels, semanticColors as colors, newSemanticColors };