TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Apr 2016 |
SPMSupports SPM | ✗ |
Maintained by Gabriel Massana.
Swift Extension to convert CMYK values into UIColor Objects.
The CMYK color model (process color, four color) is a subtractive color model, used in color printing, and is also used to describe the printing process itself. CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key (black).
platform :ios, '8.0'
use_frameworks!
pod 'ColorWithCMYK', '~> 0.0'
Then, run the following command:
$ pod install
Drag into your project the folder /ColorWithCMYK-iOS
. That’s all.
let redColor = UIColor.colorWithCMYK(c: 0.0, m: 1.0, y: 1.0, k: 0.0)
let greenColor = UIColor.colorWithCMYK(c: 1.0, m: 0.0, y: 1.0, k: 0.0)
let blueColor = UIColor.colorWithCMYK(c: 1.0, m: 1.0, y: 0.0, k: 0.0)
let blackColor = UIColor.colorWithCMYK(c: 0.0, m: 0.0, y: 0.0, k: 1.0)
let whiteColor = UIColor.colorWithCMYK(c: 0.0, m: 0.0, y: 0.0, k: 0.0)
#import "ColorWithCMYK-Swift.h"
...
UIColor *black = [UIColor cmyk_colorWithC:0.0 M:0.0 Y:0.0 K:1.0];
UIColor *white = [UIColor cmyk_colorWithC:0.0 M:0.0 Y:0.0 K:0.0];
UIColor *red = [UIColor cmyk_colorWithC:0.0 M:1.0 Y:1.0 K:0.0];
UIColor *green = [UIColor cmyk_colorWithC:1.0 M:0.0 Y:1.0 K:0.0];
UIColor *blue = [UIColor cmyk_colorWithC:1.0 M:1.0 Y:0.0 K:0.0];
ColorWithCMYK-iOS is released under the MIT license. Please see the file called LICENSE.
$ git tag -a 0.0.0 -m 'Version 0.0.0'
$ git push --tags
Gabriel Massana
Please open a new Issue here if you run into a problem specific to ColorWithCMYK-iOS, have a feature request, or want to share a comment.