GithubHelp home page GithubHelp logo

abhinavdimri / color Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thisandagain/color

0.0 2.0 0.0 498 KB

A collection of categories and utilities that extend UIColor

License: MIT License

Objective-C 94.34% Ruby 0.94% Makefile 0.06% JavaScript 4.67%

color's Introduction

Color

Build Status Version Platform

Getting Started

The quickest way to get started with EDColor is with CocoaPods, but otherwise you can add the EDColor directory to your project and...

#import "EDColor.h"

This will automatically bring in all of the various categories and classes that make up the library. Alternatively, if you only need the functionality from a single part of EDColor, you can just import that specific header as the library was designed to be completely modular and (thus) decoupled.

UIColor+Hex

UIColor *green   = [UIColor colorWithHex:0x00FF00];
UIColor *blue    = [UIColor colorWithHex:0x0000FF andAlpha:0.5f];
UIColor *gray    = [UIColor colorWithHexString:@"#CCC"];

UIColor+HSB

UIColor *red     = [UIColor colorWithRed:1.0f green:0.0f blue:0.0f alpha:1.0f];
UIColor *blue    = [red offsetWithHue:-0.56f saturation:0.0f brightness:0.0f alpha:0.0f];

UIColor+HSL

UIColor *red     = [UIColor colorWithRed:1.0f green:0.0f blue:0.0f alpha:1.0f];
UIColor *pink    = [red offsetWithHue:0.0f saturation:0.0f lightness:0.82f alpha:0.0f];

UIColor+CIELAB

UIColor *red            = [UIColor colorWithRed:1.0f green:0.0f blue:0.0f alpha:1.0f];
UIColor *brighterRed    = [red offsetWithLightness:15.0f a:0.0f b:0.0f alpha:0.0f];

UIColor+Crayola

Because crayons are fun! Full list of colors: http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors

UIColor *mint    = [UIColor colorWithCrayola:@"Magic Mint"];
UIColor *blue    = [UIColor colorWithCrayola:@"Midnight Blue"];
UIColor *rorange = [UIColor colorWithCrayola:@"Orange Red"];

UIColor+iOS7

Some of the iOS7 colors from ios7colors.com.

UIColor *yellow    = [UIColor iOS7yellowColor];

UIColor *greenGradientStart = [UIColor iOS7greenGradientStartColor];
UIColor *greenGradientEnd = [UIColor iOS7greenGradientEndColor];


Contributing

Install CocoaPods with gem install cocoapods. Run pod install. Open EDColor.xcworkspace.

Testing

The test suite for EDColor is built using OCUnit. To run the test suite, simply open the project in XCode and choose "test" from the Product menu. Please run and augment the tests prior to submitting a pull request.

iOS Support

EDColor is tested on iOS 5 and up. Older versions of iOS may work but are not currently supported.

ARC

EDColor is built using ARC. If you are including EDColor in a project that does not use Automatic Reference Counting (ARC), you will need to set the -fobjc-arc compiler flag on all of the EDColor source files. To do this in Xcode, go to your active target and select the "Build Phases" tab. Now select all EDColor source files, press Enter, insert -fobjc-arc and then "Done" to enable ARC for EDColor.

color's People

Contributors

chenyongwei avatar dblock avatar dongle avatar gurgeous avatar pixelslip avatar sbandol avatar shuoli84 avatar thisandagain avatar yeahphil avatar

Watchers

 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.