Latest 1.0.0
Homepage https://github.com/dpyro/MaterialColors
License MIT
Platforms ios 8.0, requires ARC
Authors

MaterialColors.swift

Everything you need to use the Google Material Design Colors!

Screenshot

Usage

Either add MaterialColors.swift to your project or MaterialColors.framework
to your Linked Frameworks and Library section in Xcode under your Target.
Don’t forget to also do import MaterialColors.

To use the base Red color:

let color: UIColor = MaterialColors.Red.primaryColor

To use the text color for Light Blue 300:

let color: UIColor = MaterialColors.LightBlue.P300.textColor

To pick a random color:

let materialColors: [MaterialColor] = MaterialColors.P500
let randomIndex: Int = Int(arc4random_uniform(UInt32(materialColors.count)))
let randomColor: UIColor = materialColors[randomIndex].color

License

This code is distributed under the terms and conditions of the MIT license.

Latest podspec

{
    "name": "MaterialColors",
    "version": "1.0.0",
    "summary": "Implementation of Material Design Colors in Swift 2.1.",
    "description": "Everything you need to use the Google Material Design Colors.nIncludes the various colors in groupings and both nby static name and string lookup.nFun for the whole family.",
    "homepage": "https://github.com/dpyro/MaterialColors",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "screenshots": [
        "https://raw.githubusercontent.com/dpyro/MaterialColors/master/screenshot.png",
        {
            "type": "MIT",
            "file": "LICENSE"
        }
    ],
    "authors": {
        "Sumant Manne": "[email protected]"
    },
    "social_media_url": "http://twitter.com/SumantManne",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/dpyro/MaterialColors.git",
        "tag": "1.0.0"
    },
    "source_files": "MaterialColors/*.{h,swift}",
    "requires_arc": true
}

Pin It on Pinterest

Share This