title: change according to dark mode
body: <p>How can I make it so that drawables and objects in MainActivity.xml change colour depending on if dark mode is on or not? I have this in colors.xml:</p>
  
  <pre><code>&lt;resources&gt;
  &lt;color name="colorPrimary"&gt;#141414&lt;/color&gt;
  &lt;color name="colorPrimaryDark"&gt;#000000&lt;/color&gt;
  &lt;color name="colorAccent"&gt;#C923FE&lt;/color&gt;
  &lt;color name="textColor"&gt;#9719BF&lt;/color&gt;
  
  
  &lt;color name="colorPrimary2"&gt;#81CDC9&lt;/color&gt;
  &lt;color name="colorPrimaryDark2"&gt;#A8F8F3&lt;/color&gt;
  &lt;color name="colorAccent2"&gt;#3C3C3C&lt;/color&gt;
  &lt;color name="textColor2"&gt;#6E6E6E&lt;/color&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want the second set of colours to be set in light mode, and the first in dark mode. My styles.xml consists of this:</p>
  
  <pre><code>&lt;style name="AppThemeDark" parent="Theme.AppCompat.DayNight.NoActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;item name="android:statusBarColor"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="android:textColorHint"&gt;@color/textColor&lt;/item&gt;
  &lt;/style&gt;
  
  
  &lt;style name="AppThemeLight" parent="Theme.AppCompat.DayNight.NoActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary2&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark2&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent2&lt;/item&gt;
      &lt;item name="android:statusBarColor"&gt;@color/colorPrimary2&lt;/item&gt;
      &lt;item name="android:textColorHint"&gt;@color/textColor2&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>If my drawables and components in MainActivity access their colours with something like</p>
  
  <pre><code>android:textColor="@color/colorAccent"
  </code></pre>
  
  <p>then is there a way for me to change the pallete of the app if dark mode is on/off? Is there something i'm missing from all the tutorials i've seen, where I have to do something special to the MainActivity.xml components and drawables so they can access colours a different way? Thanks :)</p>