Latest 1.0.2
Homepage https://github.com/ecnepsnai/Material-Design-IOS
License MIT
Platforms ios 7.0, tvos 9.0, requires ARC
Authors

Material Design Colors in iOS

A simple framework that lets you easily use Material Design Colors in any iOS or TVOS project!

Includes all colors (except Black and White) seen here.

Installation

Cocoapods

Add:

pod 'MaterialDesignColors'

To your pod file. Make sure you uncomment use_frameworks! if you’re using Swift!

Manually

Drag the two files inside the Classes directory onto your project and import them.

Usage

Getting a color

To get a color, simply use:

UIColor * myColor = [UIColor materialRed];

You can also specify a colors level using:

UIColor * myColor = [UIColor materialRedWithLevel:800];

Not specifying a level will return 500.

You can also determine the best color to use for content of a given background color using:

UIColor * backgroundColor = [UIColor materialRed];
UIColor * foregroundColor = [backgroundColor contentColor];

Latest podspec

{
    "name": "MaterialDesignColors",
    "version": "1.0.2",
    "summary": "The Material Design Colours on iOS",
    "homepage": "https://github.com/ecnepsnai/Material-Design-IOS",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ian Spence": "[email protected]"
    },
    "social_media_url": "https://twitter.com/ecnepsnai",
    "source": {
        "git": "https://github.com/ecnepsnai/Material-Design-IOS.git",
        "tag": "1.0.2"
    },
    "source_files": "Classes/**/*",
    "requires_arc": true,
    "platforms": {
        "ios": "7.0",
        "tvos": "9.0"
    }
}

Pin It on Pinterest

Share This