# Night Mode Button

**URL:** <https://discourse.joplinapp.org/t/night-mode-button/6581>\
**Category:** Features\
**Created:** [5 March 2020 07:13 UTC](https://discourse.joplinapp.org/t/night-mode-button/6581 "2020-03-05T07:13:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kowalskidev](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/kowalskidev/32/2877_2.png) [@kowalskidev](https://discourse.joplinapp.org/u/kowalskidev)\
**Post date:** [6 April 2020 09:48 UTC](https://discourse.joplinapp.org/t/night-mode-button/6581/6 "2020-04-06T09:48:48Z")

</div>

> [@laurent](#):
>
> For night mode switch, you’d only need `theme.preferedDarkTheme` and `theme.preferedLightTheme` settings for now.

I have one doubt, As you mentioned here:

> [@Feature idea: automatic dark/light theme switching according to OS](https://discourse.joplinapp.org/t/feature-idea-automatic-dark-light-theme-switching-according-to-os/6010/7):
>
> The VSCode solution sounds good to me. I think we could have three new controls: Auto Detect Theme (theme.autodetect): a checkbox Prefered Dark Theme (theme.preferedDarkTheme): dropdown with all the themes Prefered Light Theme (theme.preferedLightTheme): dropdown with all the themes So you need three new setting values: theme.autodetect, theme.preferedDarkTheme and theme.preferedLightTheme. When theme.autodetect is true, the theme.preferedDarkTheme and theme.preferedLightTheme dropdown are v…

> [@Feature idea: automatic dark/light theme switching according to OS](https://discourse.joplinapp.org/t/feature-idea-automatic-dark-light-theme-switching-according-to-os/6010/7):
>
> When `theme.autodetect` is **true** , the `theme.preferedDarkTheme` and `theme.preferedLightTheme` dropdown are visible, and the “Theme” dropdown is hidden.
> 
> When `theme.autodetect` theme is **off** , the `theme.preferedDarkTheme` and `theme.preferedLightTheme` dropdown are hidden, and the “Theme” dropdown is visible.

When Auto Detect option is unchecked, preferred theme options won't be visible then how we can be able to set preferred themes for Night Mode button?  
I think preferred theme options should be visible and Auto Detect theme option should also set theme according to preferred themes.

- Auto Detect [✔] -\> Detected Dark theme ? =\> Theme: preferredDarkTheme

- Auto Detect [✔] -\> Detected Light theme ? =\> Theme: preferredLightTheme

- Auto Detect [✔] -\> Hide Theme drop down

- Auto Detect [✖] -\> Visible Theme drop down

- Night Mode button should toggle between preferred theme options

Here is the demo video of what I implemented in my first [PR](https://github.com/laurent22/joplin/pull/2864).

- [Joplin Theme Feature](https://drive.google.com/file/d/1dJyaigWjWcIBvu0diap-Ss6t1D3Rpdwo/view?usp=sharing)

---

_[View the full topic](https://discourse.joplinapp.org/t/night-mode-button/6581)._
