https://github.com/polidea/plcolors
Objective-C library to create UIColor/NSColor objects based on the HEX color representation.
https://github.com/polidea/plcolors
Last synced: about 1 year ago
JSON representation
Objective-C library to create UIColor/NSColor objects based on the HEX color representation.
- Host: GitHub
- URL: https://github.com/polidea/plcolors
- Owner: Polidea
- License: mit
- Created: 2015-01-14T10:41:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-03T13:58:42.000Z (almost 10 years ago)
- Last Synced: 2024-11-10T22:49:44.837Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 315 KB
- Stars: 4
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
This library is deprecated in favor of [PLXColors](https://github.com/Polidea/PLXColors)
---
# PLColors
[](https://travis-ci.org/Polidea/PLColors)
[](http://cocoadocs.org/docsets/PLColors)
[](http://cocoadocs.org/docsets/PLColors)
[](http://cocoadocs.org/docsets/PLColors)
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:
```objc
+ (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](http://cocoadocs.org/docsets/PLColors) to check in which format should be parameters.
## Requirements
- iOS6 or OS X 10.8
## Installation
PLColors is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
pod "PLColors"
## Author
Michał Laskowski, michal.laskowski@polidea.com
## License
PLColors is available under the MIT license. See the LICENSE file for more info.