Palettes
The Palettes component provides Material colors organized into similar palettes.
Design & API Documentation
Installation
Installation with CocoaPods
To add this component to your Xcode project using CocoaPods, add the following to your Podfile:
pod 'MaterialComponents/Palettes'
Then, run the following command:
xxxxxxxxxx
pod install
Usage
Importing
Before using Palettes, you'll need to import it:
Swift
xxxxxxxxxx
import MaterialComponents.MaterialPalettes
Objective-C
xxxxxxxxxx
Using palettes
Much like UIColor objects, MDCPalette objects are immutable static objects you can use to obtain Material colors. All palettes have a set of tints with lower numbers being lighter colors and higher numbers being darker colors. The 500 tint is the most common representative color for its respective palette. Most palettes (but not all) also have a set of accent colors following a similar naming scheme.
Examples
Swift
xxxxxxxxxx
view.backgroundColor = MDCPalette.green.tint500
Objective-C
xxxxxxxxxx