Latest 1.1
Homepage https://github.com/xiabob/WebColor
License MIT
Platforms ios 8.0, requires ARC
Authors

WebColor is very convenient to show web color in swift!

Requirements

  • iOS 8.0+
  • Xcode 8.1+
  • Swift 3.0+

Installation

CocoaPods

pod 'WebColor'

Manually

Download the project and copy the Class folder into your project to use it in

Usage

let _ = "rgb(120, 232, 100)".color()
let _ = "rgba(255, 0, 0, 0.5)".color()
let _ = "fd0".color()
let _ = "fd0f".color()
let _ = "ff3366".color()
let _ = "333366ff".color()
let _ = "#fd0".color()
let _ = "#fd0f".color()
let _ = "#ff3366".color()
let _ = "#333366ff".color()
let _ = "red".color()
let _ = "hsl(0, 100%, 50%)".color()
let _ = "hsla(120, 100%, 50%, 1)".color()
let _ = "hsv(258, 30%, 78%)".color()
let _ = "hsva(258, 30%, 78%, 1)".color()
let _ = "hsb(258, 30%, 78%)".color()
let _ = "hsba(258, 30%, 78%, 1)".color()

OR

let _ = UIColor("rgb(120, 232, 100)")
let _ = UIColor("fd0f")
let _ = UIColor("#ff3366")
let _ = UIColor("green")
let _ = UIColor("hsla(120, 100%,50%, 1)")
let _ = UIColor("dah8d") // error color code

Latest podspec

{
    "name": "WebColor",
    "version": "1.1",
    "authors": {
        "xiabob": "[email protected]"
    },
    "homepage": "https://github.com/xiabob/WebColor",
    "summary": "WebColor is very convenient to show color in swift!",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "source": {
        "git": "https://github.com/xiabob/WebColor.git",
        "tag": "1.1"
    },
    "source_files": "Class/*.swift",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This