Overview
ThedynamicColorChange event fires when the plugin detects a change in either:
- The day/night theme (light/dark mode)
- The dynamic color palette
- Both at the same time
Event Object
The event object contains achanged property that indicates what triggered the event:
true if the day/night theme has changed (dark mode turned on or off)true if the dynamic color palette has changedBoth properties can be
true simultaneously if the system changes both the theme and colors at the same time.Example
Here’s a complete example showing how to listen for and respond to dynamic color changes:Use Cases
- Refresh UI components when the color palette changes
- Toggle dark/light mode styles when the theme changes
- Update charts or visualizations with new dynamic colors
- Reload content that depends on the current theme