Skip to content
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

Feature Request: Add option to set backgroundColor in light mode and dark mode separately. #99

Open
qwerzl opened this issue Jan 9, 2023 · 3 comments

Comments

@qwerzl
Copy link

qwerzl commented Jan 9, 2023

Hi there, first of all, thank you for your work!

It would be nice if it's possible to set the background color separately like as following:

const options = {
  bottom: '64px', // default: '32px'
  right: 'unset', // default: '32px'
  left: '32px', // default: 'unset'
  time: '0.5s', // default: '0.3s'
  mixColor: '#fff', // default: '#fff'
  backgroundColorDark: '#fff',  // default: '#fff'
  backgroundColorLight: '#000',
  buttonColorDark: '#100f2c',  // default: '#100f2c'
  buttonColorLight: '#fff', // default: '#fff'
  saveInCookies: false, // default: true,
  label: '🌓', // default: ''
  autoMatchOsTheme: true // default: true
}

In my specific case, I would like my website to be #000 in light mode, but when the darkmode is applied, the color #FFF is far too dark. It really affects the reading experience.

@Purfview
Copy link

You can set backgroundColor to whatever you want.

When darkmode is off then you should remove custom background:

document.getElementsByClassName('darkmode-background')[0].remove();

@aysal04
Copy link

aysal04 commented May 9, 2023

Is this issue open now?

@Purfview
Copy link

Purfview commented May 9, 2023

Is this issue open now?

If you see "Open" in a green background at the top-left side of the page then it's open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants