Skip to content

jeswinsimon/CSSColors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSSColors

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 jeswinsimon@gmail.com or contact me on twitter @jeswinsimon regarding queries and suggestions.

License

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