Coder Social home page Coder Social logo

colorwithcmyk-ios's Introduction

ColorWithCMYK-iOS

Version License Platform CocoaPods Build Status

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.

colorwithcmyk-ios's People

Contributors

gabrielmassana avatar

Stargazers

Kyle Howells avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.