'How to change the color of `color set` programmatically in iOS?

There is any way to change the color of color set programmatically.

enter image description here

enter image description here

I use theme color in Xcode and now I want this color come from API. Anyone can solve my problem.

I search this on the net but all tell us how to make color set and how to use it but I want how to change this color during run time.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source