Latest 1.0.1
Homepage https://github.com/mdjordjevic/uiimage-content-color
License MIT
Platforms ios 6.1, requires ARC
Frameworks UIKit
Authors

Useful UIImage category for getting average color and average content darkness level.

Installation with CocoaPods

pod 'UIImage+MDContentColor'

Usage

#import "UIImage+MDContentColor.h"

UIImage *backgroundImage = /* get background image */
MDContentColor contentColor = [backgroundImage md_imageContentColor];
if( contentColor == MDContentColorLight ) {
    // background is light, so use dark text
}
else {
    // background is dark, so use light text
}

Latest podspec

{
    "name": "UIImage+MDContentColor",
    "version": "1.0.1",
    "summary": "Useful UIImage category for getting average color and average content darkness level.",
    "homepage": "https://github.com/mdjordjevic/uiimage-content-color",
    "license": "MIT",
    "authors": {
        "Mladen Djordjevic": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mdjordjevic/uiimage-content-color.git",
        "tag": "1.0.1"
    },
    "social_media_url": "https://twitter.com/dj_mladen",
    "platforms": {
        "ios": "6.1"
    },
    "source_files": "UIImage+MDContentColor.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This