Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Fix #1 to improve color contrast in dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Apr 27, 2019
1 parent da4e47f commit 1f9da08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
6 changes: 4 additions & 2 deletions web/components/info/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ const styles = (theme: Theme) =>
subtitle: {
marginBottom: '2em',
fontWeight: 'bold',
fontSize: '120%'
fontSize: '120%',
color: theme.palette.secondary.main
},
content: {
maxWidth: '40em'
Expand Down Expand Up @@ -154,7 +155,8 @@ const styles = (theme: Theme) =>
},
ol: {
fontFamily: '"Roboto"',
fontSize: '110%'
fontSize: '110%',
color: theme.palette.text.primary
},
p: {
fontSize: '110%',
Expand Down
23 changes: 16 additions & 7 deletions web/constants/theme.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { createMuiTheme } from '@material-ui/core/styles';

export const theme = createMuiTheme({
palette: {
type: localStorage.theme,
primary: { main: '#6a1b9a' },
secondary: { main: '#3f51b5' }
}
});
export const theme =
localStorage.theme == 'dark'
? createMuiTheme({
palette: {
type: 'dark',
primary: { main: '#af27ff' },
secondary: { main: '#5972ff' }
}
})
: createMuiTheme({
palette: {
type: 'light',
primary: { main: '#6a1b9a' },
secondary: { main: '#3f51b5' }
}
});

0 comments on commit 1f9da08

Please sign in to comment.