Q:

Any way to get iOS system default theme colors

In my app, I have programmatically changed the colours of some widgets, e.g. navigation bar, buttons. 
Now, if I want to tell my app to restore system provided colours (default) for the widgets, is that any way to achieve that since I don't want to store all the system colours somewhere.
Thanks

A:

Swift 5 - iOS 13+
Yes, setting the color to nil will revert back to the default colors. And this will work appropriately with Dark mode too. 
Examples:
myButton.textColor = nil
navBar.titleTextAttributes?[.foregroundColor] = nil
navBar.largeTitleTextAttributes?[.foregroundColor] = nil
navBar.barTintColor = nil

where navBar is the instance of your navigation bar.

