# Material Theming with MDC: Color

DevFeed: [Material Theming with MDC: Color](<https://devfeed.tech/articles/material-theming-with-mdc-color-25988.md>)

Original publisher: [Read original article](<https://medium.com/androiddevelopers/material-theming-with-mdc-color-860dbba8ce2f?source=rss-37290b859aca------2>)

Author: Nick Rout

Published: 2020-08-25T16:02:38Z

Content type: tutorial

Language: en

Sources: [Stories by Nick Rout on Medium](<https://devfeed.tech/sources/stories-by-nick-rout-on-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [material-components](<https://devfeed.tech/topics/material-components.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [Dark Mode](<https://devfeed.tech/topics/dark-mode.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [components](<https://devfeed.tech/tags/components.md>), [design](<https://devfeed.tech/tags/design.md>), [mad-skills](<https://devfeed.tech/tags/mad-skills.md>), [material-components](<https://devfeed.tech/tags/material-components.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material-theming](<https://devfeed.tech/tags/material-theming.md>), [migration](<https://devfeed.tech/tags/migration.md>), [usability](<https://devfeed.tech/tags/usability.md>)

## AI overview

This tutorial explains color theming for Android applications with the Material Components library. It describes Material Design color slots, baseline light and dark themes, color attributes used to tint widgets, accessibility and contrast requirements, and tools for selecting and previewing color variants.

## Source excerpt

Color theming on Android using the MDC library This article is also posted on the Material Design blog. Material Theming is a way to customize Material Components to align with your brand. A Material theme includes color, typography and shape parameters which you can adjust to get near-infinite variations of the components -- all while maintaining their core anatomy and usability. On Android, Material Theming can be implemented using the Material Components (MDC) library, from version 1.1.0 onwards. If you're looking to migrate from the Design Support Library or MDC 1.0.0, take a look at our migration guide. Migrating to Material Components for Android This article will be focusing on color theming. Color attributes Material Design provides 12 color "slots" that make up the overall palette of your app. Each of these have a design term (eg. "Primary") along with a corresponding color attribute that can be overridden in your app theme (eg. colorPrimary). There are default "baseline" values for both your light theme and dark theme. MDC color attributes with light baseline valuesMDC color attributes with dark baseline values Material Components use these color attributes to tint elements of the widgets. Color attributes used by a button They are applied with eg. app:backgroundTint="?attr/colorSecondary" in layouts and widget styles. You might recognise some of these color attributes like colorPrimary. That's because a few of them are inherited from AppCompat and the platform, while the rest have been newly introduced by MDC. The table below illustrates the origin of each attribute. https://medium.com/media/913ab7a828a11fee6cf9fb333df54f3a/hrefPicking colors Figuring out which color values to use for each slot may be the responsibility of a designer, or derived from your product's brand. However, it's still useful to know about the role of each color, the relationship between them, and how to meet accessibility requirements: colorPrimary and colorSecondary represent the c