Latest 1.0.0
Homepage https://github.com/jeswinsimon/CSSColors
License MIT
Platforms ios 8.0
Frameworks UIKit, Foundation
Authors

Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CSSColors is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "CSSColors"

Description

RGB Initializer

let aliceblue = UIColor.rgb(240, 248, 255)

RGBA Initializer

let aliceblue = UIColor.rgba(240, 248, 255, 0.5)

Basic CSS Colors

let blackColor = UIColor.blackCSSColor()
let silverColor = UIColor.silverCSSColor()
let grayColor = UIColor.grayCSSColor()
let whiteColor = UIColor.whiteCSSColor()
let maroonColor = UIColor.maroonCSSColor()
let redColor = UIColor.redCSSColor()
let purpleColor = UIColor.purpleCSSColor()
let fuchsiaColor = UIColor.fuchsiaCSSColor()
let greenColor = UIColor.greenCSSColor()
let limeColor = UIColor.limeCSSColor()
let oliveColor = UIColor.oliveCSSColor()
let yellowColor = UIColor.yellowCSSColor()
let navyColor = UIColor.navyCSSColor()
let blueColor = UIColor.blueCSSColor()
let tealColor = UIColor.tealCSSColor()
let aquaColor = UIColor.aquaCSSColor()

Updates

Updates are planned to add the following enhancements

  • Extended Colors to include all X11 color names.
  • Updated Demo application to include RGB and RGBA initializers.

Note

RGB and RGBA initializers are included as Class methods rather than initializers to avoid conflicts with existing initializers. Basic colors include all basic colors listed in the W3C CSS specification including the ones already provided by UIColor.

Any suggestions for improvements are welcome. Kindly email me at [email protected] or contact me on twitter @jeswinsimon regarding queries and suggestions.

License

CSSColors is available under the MIT license. See LICENSE for more info.

Latest podspec

{
    "name": "CSSColors",
    "version": "1.0.0",
    "summary": "UIColor extension for supporting CSS Colors",
    "description": "Extend UIColor to Support CSS Color CodesnCreate UIColor objects with rgb and rgba color codes",
    "homepage": "https://github.com/jeswinsimon/CSSColors",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "jeswinsimon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jeswinsimon/CSSColors.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://twitter.com/jeswinsimon",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ]
}

Pin It on Pinterest

Share This