Current QML api for switching palettes could be considered sub-optimal in that use case.
Qt 6 introduces a few new properties and a ColorGroup but may not go far enough to provide full run-time palette switching (with dark/light mode options included).
Use case to consider: an app which shows a menu of sub-sections. The app is colored with blue shades but each of the sub-sections when opened has its particular theme e.g. shades of red or green according to the purpose of the section. The blue, red and green palettes should be applied at the app and section levels to afford the expected cascade behaviour but we also want those palettes to contain the dark and light options for each. The present API makes it quite cumbersome to achieve.