Skip to content

Commit 5b78251

Browse files
refactor: Initial color palette changes (coder#3087)
1 parent e33a749 commit 5b78251

File tree

11 files changed

+44
-28
lines changed

11 files changed

+44
-28
lines changed

site/src/components/AvatarData/AvatarData.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ const useStyles = makeStyles((theme) => ({
4848
},
4949
avatar: {
5050
marginRight: theme.spacing(1.5),
51+
background: "hsl(219, 8%, 52%)",
5152
},
5253
}))

site/src/components/BuildsTable/BuildsTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const BuildsTable: FC<BuildsTableProps> = ({ builds, className }) => {
109109
const useStyles = makeStyles((theme) => ({
110110
clickableTableRow: {
111111
"&:hover td": {
112-
backgroundColor: fade(theme.palette.primary.light, 0.1),
112+
backgroundColor: fade(theme.palette.primary.dark, 0.1),
113113
},
114114

115115
"&:focus": {

site/src/components/CodeExample/CodeExample.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const useStyles = makeStyles((theme) => ({
2929
display: "flex",
3030
flexDirection: "row",
3131
alignItems: "center",
32-
background: theme.palette.background.default,
32+
background: "hsl(223, 27%, 3%)",
33+
border: `1px solid ${theme.palette.divider}`,
3334
color: theme.palette.primary.contrastText,
3435
fontFamily: MONOSPACE_FONT_FAMILY,
3536
fontSize: 14,

site/src/components/CopyButton/CopyButton.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ const useStyles = makeStyles((theme) => ({
8282
},
8383
copyButton: {
8484
borderRadius: 7,
85-
background: theme.palette.background.default,
86-
color: theme.palette.primary.contrastText,
8785
padding: theme.spacing(0.85),
8886
minWidth: 32,
8987

site/src/components/NavbarView/NavbarView.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const useStyles = makeStyles((theme) => ({
104104
},
105105
link: {
106106
alignItems: "center",
107-
color: "#A7A7A7",
107+
color: "hsl(220, 11%, 71%)",
108108
display: "flex",
109109
fontSize: 16,
110110
height: navHeight,
@@ -113,7 +113,7 @@ const useStyles = makeStyles((theme) => ({
113113
transition: "background-color 0.3s ease",
114114

115115
"&:hover": {
116-
backgroundColor: fade(theme.palette.primary.light, 0.1),
116+
backgroundColor: fade(theme.palette.primary.light, 0.05),
117117
},
118118

119119
// NavLink adds this class when the current route matches.

site/src/components/UserDropdown/UsersDropdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const useStyles = makeStyles((theme) => ({
8383
padding: `${theme.spacing(1.5)}px ${theme.spacing(2.75)}px`,
8484

8585
"&:hover": {
86-
backgroundColor: fade(theme.palette.primary.light, 0.1),
86+
backgroundColor: fade(theme.palette.primary.light, 0.05),
8787
transition: "background-color 0.3s ease",
8888
},
8989
},

site/src/components/UserDropdownContent/UserDropdownContent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const useStyles = makeStyles((theme) => ({
142142
padding: `${theme.spacing(1.5)}px ${theme.spacing(2.75)}px`,
143143

144144
"&:hover": {
145-
backgroundColor: fade(theme.palette.primary.light, 0.1),
145+
backgroundColor: fade(theme.palette.primary.light, 0.05),
146146
transition: "background-color 0.3s ease",
147147
},
148148
},

site/src/components/WorkspacesTable/WorkspacesRow.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const WorkspacesRow: FC<{ workspaceRef: WorkspaceItemMachineRef }> = ({ w
9191
const useStyles = makeStyles((theme) => ({
9292
clickableTableRow: {
9393
"&:hover td": {
94-
backgroundColor: fade(theme.palette.primary.light, 0.1),
94+
backgroundColor: fade(theme.palette.primary.dark, 0.1),
9595
},
9696

9797
"&:focus": {

site/src/pages/TemplatesPage/TemplatesPageView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const useStyles = makeStyles((theme) => ({
174174
},
175175
clickableTableRow: {
176176
"&:hover td": {
177-
backgroundColor: fade(theme.palette.primary.light, 0.1),
177+
backgroundColor: fade(theme.palette.primary.dark, 0.1),
178178
},
179179

180180
"&:focus": {

site/src/theme/overrides.ts

+20-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,23 @@ import { MONOSPACE_FONT_FAMILY } from "./constants"
44
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
55
export const getOverrides = (palette: PaletteOptions) => {
66
return {
7+
MuiCssBaseline: {
8+
"@global": {
9+
body: {
10+
backgroundImage:
11+
"linear-gradient(to right bottom, hsl(223, 38%, 14%), hsl(221, 53%, 3%))",
12+
backgroundRepeat: "no-repeat",
13+
backgroundAttachment: "fixed",
14+
letterSpacing: "-0.015em",
15+
},
16+
},
17+
},
718
MuiAvatar: {
819
root: {
920
borderColor: palette.divider,
1021
width: 36,
1122
height: 36,
12-
fontSize: 20,
23+
fontSize: 18,
1324
},
1425
},
1526
MuiButton: {
@@ -26,7 +37,7 @@ export const getOverrides = (palette: PaletteOptions) => {
2637
contained: {
2738
boxShadow: "none",
2839
color: palette.text?.primary,
29-
backgroundColor: "#151515",
40+
backgroundColor: "hsl(223, 27%, 3%)",
3041
"&:hover": {
3142
boxShadow: "none",
3243
backgroundColor: "#000000",
@@ -62,11 +73,12 @@ export const getOverrides = (palette: PaletteOptions) => {
6273
root: {
6374
// Gives the appearance of a border!
6475
borderRadius: 2,
65-
border: `1px solid ${palette.divider}`,
76+
background: "hsla(222, 31%, 19%, .5)",
6677

6778
"& td": {
6879
paddingTop: 16,
6980
paddingBottom: 16,
81+
background: "transparent",
7082
},
7183
},
7284
},
@@ -97,11 +109,15 @@ export const getOverrides = (palette: PaletteOptions) => {
97109
},
98110
MuiOutlinedInput: {
99111
root: {
112+
"& .MuiOutlinedInput-notchedOutline": {
113+
borderColor: palette.divider,
114+
},
115+
100116
"& input:-webkit-autofill": {
101117
WebkitBoxShadow: `0 0 0 1000px ${palette.background?.paper} inset`,
102118
},
103119
"&:hover .MuiOutlinedInput-notchedOutline": {
104-
borderColor: (palette.primary as SimplePaletteColorOptions).light,
120+
borderColor: palette.divider,
105121
},
106122
},
107123
},

site/src/theme/palettes.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ import { PaletteOptions } from "@material-ui/core/styles/createPalette"
33
export const darkPalette: PaletteOptions = {
44
type: "dark",
55
primary: {
6-
main: "#409BF4",
7-
contrastText: "#f8f8f8",
8-
light: "#79B8FF",
9-
dark: "#1976D2",
6+
main: "hsl(215, 81%, 63%)",
7+
contrastText: "hsl(218, 44%, 92%)",
8+
light: "hsl(215, 83%, 70%)",
9+
dark: "hsl(215, 74%, 51%)",
1010
},
1111
secondary: {
12-
main: "#008510",
13-
contrastText: "#f8f8f8",
14-
dark: "#7057FF",
12+
main: "hsl(142, 64%, 34%)",
13+
contrastText: "hsl(218, 44%, 92%)",
14+
dark: "hsl(233, 73%, 63%)",
1515
},
1616
background: {
17-
default: "#1F1F1F",
18-
paper: "#292929",
17+
default: "hsl(222, 38%, 14%)",
18+
paper: "hsl(222, 32%, 19%)",
1919
},
2020
text: {
21-
primary: "#F8F8F8",
22-
secondary: "#C1C1C1",
21+
primary: "hsl(218, 44%, 92%)",
22+
secondary: "hsl(218, 32%, 77%)",
2323
},
24-
divider: "#383838",
24+
divider: "hsl(221, 32%, 26%)",
2525
warning: {
26-
main: "#C16800",
26+
main: "hsl(20, 79%, 53%)",
2727
},
2828
success: {
29-
main: "#6BBE00",
29+
main: "hsl(142, 58%, 41%)",
3030
},
3131
}

0 commit comments

Comments
 (0)