Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 451 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 451 Bytes

UIColor-colorWithHex

UIColor category for getting colors from hex value

Usage

Just copy files into your project and include UIColor+colorWithHex.h. If you need an UIColor * object with hex value #bacd12 use colorWithHex: method.

UIColor *color = [UIColor colorWithHex:0xbacd12]

For using color with alpha, you can use colorWithHex:withAlpha:

UIColor *color = [UIColor colorWithHex:0xff00ff withAlpha:0.5f]