Latest 0.1.4
Homepage https://github.com/kgn/KGNColor
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

KGNColor is a collection of helpful UIColor extensions.

[iOS 8.0+]()
[watchOS 1.0+]()
[Xcode 7.1]()
[Swift 2.0]()
Release
Build Status

Build Status
[Test Coverage]()
Carthage Compatible
CocoaPods Version
CocoaPods Platforms

Twitter
Star
Star

Installing

Carthage

github "kgn/KGNColor"

CocoaPods

pod 'KGNColor'

Examples

Hex Initializer

Using a hex value is often the easiest way to use the exact color from a design.

let tintColor = UIColor(hex: 0x2DFF5F)

Components

Used this helpful tuple to get the red, green, blue and alpha values of a UIColor.

let tintColor = UIColor.brownColor()
print("red: (tintColor.components.red)")
print("green: (tintColor.components.green)")
print("blue: (tintColor.components.blue)")
print("alpha: (tintColor.components.alpha)")

Invert a Color

let tintColor = UIColor.redColor().invert()

Lighten a Color

let tintColor = UIColor.blueColor().lighten(0.5)

Darken a Color

let tintColor = UIColor.greenColor().darken(0.5)

Progress

  • [X] Badges
  • [X] Tests
  • [X] Travis
  • [X] Carthage
  • [X] CocoaPods
  • [X] Description
  • [X] Documentation

Latest podspec

{
    "name": "KGNColor",
    "version": "0.1.4",
    "authors": {
        "David Keegan": "[email protected]"
    },
    "homepage": "https://github.com/kgn/KGNColor",
    "summary": "KGNColor is a collection of helpful UIColor extensions.",
    "source": {
        "git": "https://github.com/kgn/KGNColor.git",
        "tag": "v0.1.4"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "frameworks": "UIKit",
    "source_files": "Source/UIColor+Extension.swift"
}

Pin It on Pinterest

Share This