diff --git a/src/App.tsx b/src/App.tsx index 987933d3..dae49ed7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,7 +12,7 @@ import { prefGlobal } from "./preferences"; import { store } from "./store"; -import { theme } from "./theme"; +import { condaStoreTheme, grayscaleTheme } from "./theme"; import "../style/index.css"; @@ -78,7 +78,13 @@ export class App< render(): React.ReactNode { return ( - + diff --git a/src/colors.tsx b/src/colors.tsx new file mode 100644 index 00000000..f6e97ea7 --- /dev/null +++ b/src/colors.tsx @@ -0,0 +1,48 @@ +export const green = { + 50: "#D6EEDC", + 100: "#ADDCBA", + 200: "#85CB97", + 300: "#5CB975", + 400: "#36AB55", + 500: "#298642", + 600: "#206532", + 700: "#144321", + 800: "#0A2210", + 900: "#051108" +}; + +export const gray = { + 50: "#F7F8F8", + 100: "#E1E3E4", + 200: "#C3C7CB", + 300: "#A6ACB2", + 400: "#90969C", + 500: "#5B5F63", + 600: "#44474A", + 700: "#3C3C3B", + 800: "#242628", + 900: "#1A1C1D" +}; + +export const purple = { + 50: "#E7E0F0", + 100: "#D0C0E5", + 200: "#B9A1DA", + 300: "#A78BD0", + 400: "#8966C2", + 500: "#6643A8", + 600: "#55309D", + 700: "#3B216E", + 800: "#2F1957", + 900: "#231240" +}; + +export const red = "#D72D47"; + +export const orange = "#F66A0A"; + +export const blue = "#276BE9"; + +export const white = "#FFFFFF"; + +export const black = "#000000"; diff --git a/src/index.tsx b/src/index.tsx index 6d5d9c40..da383373 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,5 @@ export * from "./App"; export { IPreferences } from "./preferences"; export { store } from "./store"; -export { theme, themeDecorator } from "./theme"; +export { grayscaleTheme, condaStoreTheme, themeDecorator } from "./theme"; +export * from "./colors"; diff --git a/src/theme.tsx b/src/theme.tsx index fb2dca9b..6b058cc8 100644 --- a/src/theme.tsx +++ b/src/theme.tsx @@ -1,20 +1,119 @@ import { createTheme, ThemeProvider } from "@mui/material"; import React from "react"; -export const theme = createTheme({ +import { green, purple, gray, white, red, orange, blue, black } from "./colors"; + +const baseTheme = createTheme({ typography: { fontFamily: '"Inter", sans-serif' - }, + } +}); + +export const grayscaleTheme = createTheme(baseTheme, { palette: { primary: { - main: "#C4C4C4" + main: "#C4C4C4", + contrastText: white }, secondary: { - main: "#7E7E7E" + main: "#7E7E7E", + contrastText: white } } }); +export const condaStoreTheme = createTheme(baseTheme, { + palette: { + accent: baseTheme.palette.augmentColor({ + color: { + light: purple[300], + main: purple[500], + dark: purple[700], + contrastText: white, + 50: purple[50], + 100: purple[100], + 200: purple[200], + 300: purple[300], + 400: purple[400], + 500: purple[500], + 600: purple[600], + 700: purple[700], + 800: purple[800], + 900: purple[900] + }, + name: "accent" + }), + primary: baseTheme.palette.augmentColor({ + color: { + light: green[300], + main: green[500], + dark: green[700], + contrastText: white, + 50: green[50], + 100: green[100], + 200: green[200], + 300: green[300], + 400: green[400], + 500: green[500], + 600: green[600], + 700: green[700], + 800: green[800], + 900: green[900] + }, + name: "primary" + }), + secondary: baseTheme.palette.augmentColor({ + color: { + light: gray[300], + main: gray[500], + dark: gray[700], + contrastText: white, + 50: gray[50], + 100: gray[100], + 200: gray[200], + 300: gray[300], + 400: gray[400], + 500: gray[500], + 600: gray[600], + 700: gray[700], + 800: gray[800], + 900: gray[900] + }, + name: "secondary" + }), + warning: { + main: orange, + contrastText: white + }, + error: { + main: red, + contrastText: white + }, + info: { + main: blue, + contrastText: white + }, + success: { + main: green[500], + contrastText: white + }, + white: baseTheme.palette.augmentColor({ + color: { + main: white, + contrastText: black + }, + name: "white" + }), + black: baseTheme.palette.augmentColor({ + color: { + main: black, + contrastText: white + }, + name: "black" + }) + } +}); + export const themeDecorator = (func: any) => ( - {func()} + {func()} );