ColorWithCMYK 1.0.4

ColorWithCMYK 1.0.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2016
SPMSupports SPM

Maintained by Gabriel Massana.



  • By
  • Gabriel Massana

ColorWithCMYK-iOS

What is it?

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).

Installation

Podfile

platform :ios, '8.0'
use_frameworks!

pod 'ColorWithCMYK', '~> 0.0'

Then, run the following command:

$ pod install

Old school

Drag into your project the folder /ColorWithCMYK-iOS. That’s all.

Example Swift

        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)        

Example Objective-C

#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];

License

ColorWithCMYK-iOS is released under the MIT license. Please see the file called LICENSE.

Versions

$ git tag -a 0.0.0 -m 'Version 0.0.0'

$ git push --tags

Author

Gabriel Massana

Found an issue?

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.