Is it possible to set an image to display conditionally based on what theme the user is using? i.e., if the user is in “light mode”, show one image, but if the user switches to “dark mode,” show a different image.
There are 2 variables related to the Dark Theme: browser.darkSystemTheme and browser.darkTheme. Read up on both and decide what’s best for your situation.
Without knowing how Chapbook determines the state of the user’s system theme setting, you’ll have to test this out. If, for whatever reason, there is an issue with it returning true or false incorrectly, we can also use standard JavaScript practices to set a Chapbook variable to tell the story which theme is being used. However, I think you should be good with Chapbook’s built-in variables.
It’s been a while since I used Chapbook, but I hope that helps.
This ALMOST works. It does display a different picture based on theme, but Switching Theme doesn’t reload the page, so you would need to force a reload in order to get the updated image.