Is there any custom way to change the theme color

0
     hellow,I'm going to make a theme change feature in my project, But this was my first encounter with Mendix. Can you give me some simple ideas
asked
2 answers
0

Hi Foredawn,

You can see this reference https://academy.mendix.com/link/module/183/lecture/1422/3.7.1-Adding-Custom-Styling and https://docs.mendix.com/howto/front-end/calypso

answered
0

Hi Foredawn,

You can change the default colour settings in the _custom-variables.scss file in your theme folder (as explained here: https://docs.mendix.com/howto6/create-a-custom-theme-with-the-mendix-ui-framework#6-creating-a-custom-theme). However, if I read your question correctly, you want to change the theme in your running application (e.g. switching from light- to dark-mode)? 

This is a little bit more tricky, but you could try using a widget which allows dynamically (based on micro- and/or nanoflow logic) adding classes (https://marketplace.mendix.com/link/component/109716) or dynamically load extra CSS files into your page (which contains a specific theme setting): https://marketplace.mendix.com/link/component/51520 or https://marketplace.mendix.com/link/component/108878.

It depends on your specific use case which widget you should use.

Good luck and happy holidays.

Daan

answered