TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2016 |
Maintained by Carlos Alcala.
UIColor+HexUtils is a category for Hexadecimal Colors Support for UIColor. Support for prefixed # (#FFFFFF) or without (FFFFFF) Hexadecimal Colors.
The base UIColor+Hex category with the required hex transformation functions.
// with hash
UIColor *colorHash = [UIColor colorWithHex:@"#FFFFFF"];
// without hash
UIColor *colorNoHash = [UIColor colorWithHex:@"FFFFFF"];
// short Hex
UIColor *colorShort = [UIColor colorWithHex:@"#FFF"];
// with hash
let colorHash = UIColor.colorWithHex("#FFFFFF")
// without hash
let colorNoHash = UIColor.colorWithHex("FFFFFF")
// short Hex
let colorShort = UIColor.colorWithHex("#FFF")
#import "UIColor+HexUtils.h"
where you want to use UIColor+HexUtils category functionspod install UIColor+HexUtils
UIColor+HexUtils requires iOS 5.0 and above.
UIColors+Hex was created by Carlos Alcala because I was using in a lot of projects and wanted to contribute (and avoid the pain to always search for this functionality).
UIColors+Hex is available under the MIT license. See the LICENSE file for more info.