How to change to application skin(change button, text, background color) in ionic v1 based on settings



I want to change the application skin ie change button color, text color and background color based on the setting, for example the application i created, the default color is purple. Now if go to setting-> change skin color(purple, blue, green, orange) select whatever color, it should change entire application’s button, text, background color to whatever color i had chosen in the setting.
can anyone suggest some solution to proceed.

Thanks in advance