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.