# Reload theme in Makie

**URL:** <https://discourse.julialang.org/t/reload-theme-in-makie/107191>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [December 6, 2023, 2:37am UTC](https://discourse.julialang.org/t/reload-theme-in-makie/107191 "2023-12-06T02:37:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danbulnet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danbulnet/32/32194_2.png) [@danbulnet](https://discourse.julialang.org/u/danbulnet)\
**Post date:** [December 6, 2023, 2:37am UTC](https://discourse.julialang.org/t/reload-theme-in-makie/107191/1 "2023-12-06T02:37:54Z")

</div>

Hello,

I am trying to make a simple GUI using Makie.jl.  
I would like to allow users to change themes by pressing a button.

I found that the following code doesn’t work:  
`set_theme!(theme_light())`  
while that snippet works:  
`figure.scene.backgroundcolor[] = styles.darkmode.background`

The problem with the second version is that I don’t really know which properties should be updated and I would really appreciate the first approach working in the statefull app (Figure is stored in memory).

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [December 6, 2023, 7:40am UTC](https://discourse.julialang.org/t/reload-theme-in-makie/107191/2 "2023-12-06T07:40:37Z")

</div>

Changing the theme does not change figures made previously, as that would create too many observable backreferences. And you can’t know which values were previously set by you vs copied from an older theme, so it isn’t possible to fully automatically apply a new theme to an existing figure without overwriting everything.

You should be able though to pass specific theme observables into the Figure constructor and update those.

---

<div class="post-metadata">

**Author:** ![danbulnet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danbulnet/32/32194_2.png) [@danbulnet](https://discourse.julialang.org/u/danbulnet)\
**Post date:** [December 6, 2023, 10:55am UTC](https://discourse.julialang.org/t/reload-theme-in-makie/107191/3 "2023-12-06T10:55:58Z")

</div>

> [@jules](#):
>
> y automatically apply a new theme to an existing figure without overwriting everything.

Thanks a lot for your help, I should ask earlier 😅
