# Overriding Background Colors in Dark Mode

**URL:** <https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321>\
**Category:** RapidWeaver Classic\
**Created:** [August 15, 2019, 5:42pm UTC](https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321 "2019-08-15T17:42:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chet](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/chet/32/35396_2.png) [@chet](https://forums.realmacsoftware.com/u/chet)\
**Post date:** [August 15, 2019, 5:43pm UTC](https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321/1 "2019-08-15T17:43:00Z")

</div>

Hello!

I’m working on implementing dark mode on some sites using the `@media (prefers-color-scheme: dark)` method. I’ve run into an issue.

On many of my pages, I set a background color for a column stack to create some visual breaks between the content.

Can I set a different background color for a stack using CSS within the dark mode custom CSS?

Example site: [https://manorindustries.com](https://www.manorindustries.com)

---

<div class="post-metadata">

**Author:** ![habitualshaker](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/habitualshaker/32/10762_2.png) [@habitualshaker](https://forums.realmacsoftware.com/u/habitualshaker)\
**Post date:** [August 15, 2019, 6:05pm UTC](https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321/2 "2019-08-15T18:05:40Z")

</div>

If you find the ID of the stack in the inspector then you can target that. Or you could use the new custom class option if you are using S4.

e.g. the ID of your grey background is `#stacks_in_631503_page1` so you could just set a different background colour for that.

A simpler way that works quite well I have found is to use a largely transparent colour (instead of a solid colour) as this same colour often works well across both modes.

---

<div class="post-metadata">

**Author:** ![chet](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/chet/32/35396_2.png) [@chet](https://forums.realmacsoftware.com/u/chet)\
**Post date:** [August 15, 2019, 6:17pm UTC](https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321/3 "2019-08-15T18:17:19Z")

</div>

Cool. The stack ID worked.

Honestly, I’m considering just rebuilding some of these sites in Source, but this is helpful, too!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [September 15, 2019, 4:18am UTC](https://forums.realmacsoftware.com/t/overriding-background-colors-in-dark-mode/28321/4 "2019-09-15T04:18:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
