diff --git a/packages/bruno-app/src/providers/Theme/index.js b/packages/bruno-app/src/providers/Theme/index.js index e46f6a451..19c539a7f 100644 --- a/packages/bruno-app/src/providers/Theme/index.js +++ b/packages/bruno-app/src/providers/Theme/index.js @@ -6,7 +6,8 @@ import { ThemeProvider as SCThemeProvider } from 'styled-components'; export const ThemeContext = createContext(); export const ThemeProvider = (props) => { - const [storedTheme, setStoredTheme] = useLocalStorage('bruno.theme', 'light'); + const isBrowserThemeLight = window.matchMedia("(prefers-color-scheme: light)").matches; + const [storedTheme, setStoredTheme] = useLocalStorage('bruno.theme', isBrowserThemeLight ? 'light' : 'dark'); const theme = themes[storedTheme]; const themeOptions = Object.keys(themes);