Latest 1.1.0
Homepage https://github.com/devxoul/SwiftyColor
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Authors

Swift
Build Status
CocoaPods

The most sexy way to use colors in Swift. Both compatible with iOS and macOS.

Color from Hex

let color = 0x123456.color

Alpha Operator

Use infix operator ~.

let transparent = 0x123456.color ~ 50%
let red = UIColor.red ~ 10%
let float = UIColor.blue ~ 0.5 // == 50%

Percent Operator

let view = UIView()
view.alpha = 30% // == 0.3

License

SwiftyColor is under MIT license. See LICENSE file for more information.

Latest podspec

{
    "name": "SwiftyColor",
    "version": "1.1.0",
    "summary": "The most sexy way to use colors in Swift.",
    "homepage": "https://github.com/devxoul/SwiftyColor",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Suyeol Jeon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devxoul/SwiftyColor.git",
        "tag": "1.1.0"
    },
    "source_files": "Sources/*.{swift}",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    }
}

Pin It on Pinterest

Share This