Latest 3.0.0
Homepage https://github.com/anjerodesu/AVHexColor
License MIT
Platforms ios 6.0, osx 10.8
Authors

Build Status
ios/osx

AVHexColor was inspired by the lack of hexadecimal colour integration of iOS. AVHexColor is a class with hex support for both NSColor and UIColor. Supports both prefixed with "#" and without for string-based hex colours.

Methods

    • (AVColor *)colorWithFullHex:(UInt32)hexadecimal;
    • (AVColor )colorWithHexString:(NSString )hexadecimal;

And a lot of convenience methods…

Examples

iOS

// hex
UIColor *colorWithHex = [AVHexColor colorWithFullHex: 0xFFFF0000];
// string
UIColor *colorWithHex = [AVHexColor colorWithHexString: @"#8f6c"];

OS X

// hex
NSColor *colorWithHex = [AVHexColor colorWithFullHex: 0xFFFF0000];
// string
NSColor *colorWithHex = [AVHexColor colorWithHexString: @"#8f6c"];

Install

Recommended

Podfile

via CocoaPods

platform :ios
pod 'AVHexColor', '~> 3.0.0'

Alternatives

  1. Using git subtree
    • git subtree add --prefix=AVHexColor --squash https://github.com/anjerodesu/AVHexColor.git master
  2. Using git submodule
    • git submodule add https://github.com/anjerodesu/AVHexColor.git AVHexColor
  3. Download
    • Copy the AVHexColor.h and AVHexColor.m files and #import the header file (AVHexColor.h) to your project

License

ColorWithHex is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AVHexColor",
    "version": "3.0.0",
    "summary": "AVHexColor was inspired by the lack of hexadecimal colour integration of iOS.",
    "description": "AVHexColor was inspired by the lack of hexadecimal colour integration of iOS. AVHexColor is a class with hex support for both NSColor and UIColor. Supports both prefixed with "#" and without for string-based hex colours.",
    "authors": {
        "Angelo Villegas": "[email protected]"
    },
    "social_media_url": "https://twitter.com/anjerodesu",
    "homepage": "https://github.com/anjerodesu/AVHexColor",
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"
    },
    "license": "MIT",
    "source": {
        "git": "https://github.com/anjerodesu/AVHexColor.git",
        "tag": "3.0.0"
    },
    "source_files": "AVHexColor.{h,m}",
    "requires_arc": false
}

Pin It on Pinterest

Share This