antife-yinyue / HexColors.swift

Define UIColor with hex color string.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HexColors.swift

Build status Carthage compatible

Requirements

  • iOS 7.0
  • Xcode 7.3 (Swift 2.2)

Installation

Using Carthage

Add github "jsw0528/HexColors.swift" to your Cartfile and run carthage update --platform iOS. If unfamiliar with Carthage then checkout their Getting Started section or this sample app

Then add import HexColors to the top of the files using HexColors.swift.

Manually

Download the file HexColors.swift and then add to your project.

Usage

UIColor(hex: "#fff")

UIColor(hex: "#ffffff")

UIColor(hex: "#ffffff", alpha: 0.5)

Got an error?

Library not loaded: @rpath/HexColors.framework/HexColors

Please refer to Carthage/Carthage#616

License

HexColors.swift is released under an MIT license. See the LICENSE file for more information.

About

Define UIColor with hex color string.

License:MIT License


Languages

Language:Swift 83.0%Language:Objective-C 13.1%Language:Makefile 3.9%