title: Change Theme Color at Runtime in Android
body: <p>Theme colors can be changed if multiple themes added in app and can be switched at run time easily. Other way is to change the color of actiobar, textview etc one by one of all the object. This way is very long and take lots of code. Simple way i found is to change colors declare in colors.xml file but i could not find a way programmatically or third party library to do that. Is there a way to do this.</p>
  
  <p>My Colors XML File:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;color name="colorPrimary"&gt;#ea1e63&lt;/color&gt;
      &lt;color name="colorPrimaryDark"&gt;#303F9F&lt;/color&gt;
      &lt;color name="colorAccent"&gt;#FF4081&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>I just want to change <strong>colorPrimary</strong> color at runtime, this will change color on all app activities. I found <a href="https://github.com/negusoft/GreenMatter" rel="noreferrer">https://github.com/negusoft/GreenMatter</a>, to change colors at runtime but its old and dont work with android studio.</p>