PLColors 0.2.0

PLColors 0.2.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Feb 2015

Maintained by Michał Laskowski, Antoni Kedracki, Polidea.



PLColors 0.2.0

  • By
  • Michał Laskowski

PLColors is a small library that allows you to create UIColor or NSColor objects based on the hexadecimal representation of the colors, similar to that used in HTML and CSS languages. UIKit/AppKit allows you to create UIColor/NSColor objects only with floating point numbers which is inconvenient when you get these values from graphics programs.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Methods

PLColors provides four methods to create UIColor or NSColor objects:

+ (PLColor *)colorWithHexString:(NSString *)hexString;
+ (PLColor *)colorWithHexStringWithAlpha:(NSString *)hexString;
+ (PLColor *)colorWithHexInteger:(NSUInteger)value;
+ (PLColor *)colorWithHexIntegerWithAlpha:(NSUInteger)value;

where PLColor is UIColor or NSColor class depends on target platform.

See the code or Documentation to check in which format should be parameters.

Requirements

  • iOS6 or OS X 10.8

Installation

Author

Michał Laskowski, [email protected]

License

PLColors is available under the MIT license. See the LICENSE file for more info.