# How to create darkmode using a switch for all screens?

**URL:** <https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656>\
**Category:** Questions about Thunkable X\
**Tags:** design, beginner\
**Created:** [May 23, 2026, 12:11am UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656 "2026-05-23T00:11:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezraezra](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ezraezra/32/225104_2.png) [@ezraezra](https://community.thunkable.com/u/ezraezra)\
**Post date:** [May 23, 2026, 12:11am UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/1 "2026-05-23T00:11:28Z")

</div>

I’ve made a functional code for one screen, but I’m not able to replicate it without adding a switch on each screen. It’s to do with variables, but I’ve tried and don’t know how to make it work.

---

<div class="post-metadata">

**Author:** ![ninja\_hero](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@ninja\_hero](https://community.thunkable.com/u/ninja_hero)\
**Post date:** [May 23, 2026, 2:48pm UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/2 "2026-05-23T14:48:21Z")

</div>

I’m doing something similar, perhaps I can take a look?

---

<div class="post-metadata">

**Author:** ![ezraezra](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ezraezra/32/225104_2.png) [@ezraezra](https://community.thunkable.com/u/ezraezra)\
**Post date:** [May 24, 2026, 2:50pm UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/3 "2026-05-24T14:50:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e038d8ed9938f4609a19f6ef51295afba57ccb72.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/7/37d2f986af045e5d70870dfa1eab41e97d5bdc62.png)

---

<div class="post-metadata">

**Author:** ![ezraezra](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ezraezra/32/225104_2.png) [@ezraezra](https://community.thunkable.com/u/ezraezra)\
**Post date:** [May 25, 2026, 7:25am UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/4 "2026-05-25T07:25:38Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/f/3f4fb0626c53cf4e489480d1b16038ec443a3ec0.png)

---

<div class="post-metadata">

**Author:** ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)\
**Post date:** [May 27, 2026, 6:03pm UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/5 "2026-05-27T18:03:00Z")

</div>

Try the following logic instead. You need this for every screen.

When [ScreenX] opens:  
If app variable dark mode is true:  
Set the background color… etc.  
else:  
Set the background color… etc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [August 25, 2026, 6:03pm UTC](https://community.thunkable.com/t/how-to-create-darkmode-using-a-switch-for-all-screens/4108656/6 "2026-08-25T18:03:34Z")

</div>

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