Application.AppearanceChanged
From Xojo Documentation
Event
Called when a user switches between Light and Dark mode, when the accent color changes or on macOS when the user changes any accessibility system preferences that affect the appearance of the app.
Notes
Use this event to update any graphics or other UI as needed.
On macOS, you can use declares to determine which accessibility settings the user changed. Details on that can be found in Apple's documentation.
See Also
FillColor, FrameColor, TextColor methods; UserGuide:Dark Mode topic