-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH - Redefine new themes and colours (#292)
* Add new colors and define green theme * Add new colors for roles and fix the shade used previously * update main shade of color * Change name to condaStoreTheme, define more colors and refactor baseTheme
- Loading branch information
Showing
4 changed files
with
162 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) => ( | ||
<ThemeProvider theme={theme}>{func()}</ThemeProvider> | ||
<ThemeProvider theme={condaStoreTheme}>{func()}</ThemeProvider> | ||
); |