Skip to content

Instantly share code, notes, and snippets.

@jemshit
Last active March 21, 2021 01:07
Show Gist options
  • Save jemshit/0e755f9a5669fe78d0e2 to your computer and use it in GitHub Desktop.
Save jemshit/0e755f9a5669fe78d0e2 to your computer and use it in GitHub Desktop.
Android Text Colors according to Material Design Pattern
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Dark Text Color for Light Background -->
<color name="textDarkPrimary">#DE000000</color> <!--DE for %87 opacity-->
<color name="textDarkSecondary">#8A000000</color> <!--8A for %54 opacity-->
<color name="textDarkDisabled">#61000000</color> <!--61 for %38 opacity-->
<!-- White Text Color for Dark Background -->
<color name="textLightPrimary">#FFFFFF</color> <!--%100 opacity-->
<color name="textLightSecondary">#B2FFFFFF</color> <!--B2 for %70 opacity-->
<color name="textLightDisabled">#80FFFFFF</color> <!--80 for %50 opacity-->
<color name="textLightDisabledDEPRECATED">#4CFFFFFF</color> <!--4C for %30 opacity-->
</resources>
<!-- Material Design Pattern: https://www.google.com/design/spec/style/color.html#color-ui-color-application -->
<!-- by Jemshit Iskenderov: www.jemshit.com -->
@newmanw
Copy link

newmanw commented Apr 5, 2019

@eugenebrusov that is awesome didn't know that existed. That being said I am have trouble locating those resources in my app. Do I need to include a special version of app compat/androidx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment