Skip to content

Instantly share code, notes, and snippets.

@ricknout
Created July 30, 2020 13:39
Show Gist options
  • Save ricknout/25ecb85b1d45220a017a88929912763e to your computer and use it in GitHub Desktop.
Save ricknout/25ecb85b1d45220a017a88929912763e to your computer and use it in GitHub Desktop.
MDC-Android color theme attributes
<!-- Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<!-- In res/values/themes.xml -->
<style name="Theme.App" parent="Theme.App.Base">
...
<item name="colorPrimary">@color/navy_700</item>
<item name="colorPrimaryVariant">@color/navy_900</item>
<item name="colorSecondary">@color/green_300</item>
<item name="colorSecondaryVariant">@color/green_900</item>
<!-- Using default values for colorOnPrimary, colorSurface, colorError, etc. -->
</style>
<!-- In res/values-night/themes.xml -->
<style name="Theme.App" parent="Theme.App.Base">
...
<item name="colorPrimary">@color/navy_500</item>
<item name="colorPrimaryVariant">@color/navy_900</item>
<item name="colorSecondary">@color/green_300</item>
<item name="colorSecondaryVariant">@color/green_300</item>
<!-- Using default values for colorOnPrimary, colorSurface, colorError, etc. -->
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment