Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
Navigation Bar:
----------------
* background (Lollipop only) - "android:navigationBarColor"
EditText:
----------
* underline (unfocused) -- "colorControlNormal"
* underline overlay (focus) -- "colorAccent"
* cursor -- "colorAccent"
* text color -- "android:textColorPrimary"
TextView:
----------
* text color -- "android:textColorPrimary"
CheckBox:
----------
* box unchecked -- "colorControlNormal"
* box checked -- "colorAccent"
RadioButton:
-------------
* unselected -- "colorControlNormal"
* selected -- "colorAccent"
* ripple effect (Lollipop only) -- "colorControlHighlight"
SwitchCompat:
-------------
* thumb switch off -- "colorSwitchThumbNormal"
* thumb switch on -- "colorAccent"
* track overlay (when switched on) -- "colorAccent"
Spinner:
---------
* indicator (not pressed) -- "colorControlNormal"
* indicator (pressed) -- "colorAccent"
* selected entry text color (Lollipop only) -- "android:textColorPrimary"
Button:
---------
* background -- "colorButtonNormal"
* text color -- "android:textColorPrimary"
ActionBar:
-----------
* background -- "colorPrimary"
* title color -- "android:textColorPrimary"
* overflow icon -- "android:textColorPrimary"
* up button -- "android:textColorPrimary"
* action icons -- "android:textColorPrimary" †
* overflow menu background -- "android:colorBackground"
* overflow text color -- "android:textColorPrimary"
Toolbar (Theme Overlay should be used):
----------------------------------------
* background -- must be set manually in XML. Can do (android:background="?attr/colorPrimary")
* overflow icon -- "android:textColorPrimary"
* navigation icon -- "android:textColorPrimary" †
* action icons -- "android:textColorPrimary" †
* overflow menu background -- "android:colorBackground"
* overflow text color -- "android:textColorPrimary"
@ZeroBrain

This comment has been minimized.

Copy link

@ZeroBrain ZeroBrain commented Nov 8, 2016

add this : SwtichCompat.off.track = colorForeground (but opacity 30% = (enabled ==true), but 10% = (enabled ==false)

@Rah1x

This comment has been minimized.

Copy link

@Rah1x Rah1x commented Feb 27, 2018

what about alerts, which one does it fall in?

@ak14350

This comment has been minimized.

Copy link

@ak14350 ak14350 commented Jul 22, 2019

how to use colorControlNormal in both checkbox and spinner, i am using commenly spinner working normally but checkbox unchecked color also changed what can i do?

@searles

This comment has been minimized.

Copy link

@searles searles commented Oct 10, 2019

add EditText: text selection background: "android:textColorHighlight"

@CDrosos

This comment has been minimized.

Copy link

@CDrosos CDrosos commented Apr 13, 2020

what about on a default BuilderDialog? what color for example the buttons have?

@iamkdblue

This comment has been minimized.

Copy link

@iamkdblue iamkdblue commented Jul 16, 2020

what about icons?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.