-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new colors and define green theme #292
Merged
trallard
merged 4 commits into
conda-incubator:design-system-implementation
from
steff456:add-colors
Sep 25, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
12a94c7
Add new colors and define green theme
steff456 59322c6
Add new colors for roles and fix the shade used previously
steff456 0cb733a
update main shade of color
steff456 a7fe55c
Change name to condaStoreTheme, define more colors and refactor baseT…
steff456 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> | ||
); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smeragoel will have to confirm here the exact colours
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a blocker for this PR or can we add the colors for the grayscale theme in a follow up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope we can merge this and implement this later