Latest 1.0.1
License MIT
Platforms ios
Frameworks UIKit
pod 'UIColor+PerceivedLuminance'

Coupled with the UIImage+AverageColor pod you can use this pod to determine
what preferredStatusBarStyle to set for your ViewControllers:

#import "UIImage+AverageColor.h"
#import "UIColor+PerceivedLuminance.h"

@implementation MyViewController

- (UIStatusBarStyle)preferredStatusBarStyle {
    return self.topImageView.image.averageColor.perceivedLuminance > 0.5
        ? UIStatusBarStyleLightContent
        : UIStatusBarStyleDefault;


If you are having trouble getting preferredStatusBarStyle to be respected, I recommmend this StackOverflow question/answer:

Latest podspec

    "name": "UIColor+PerceivedLuminance",
    "version": "1.0.1",
    "homepage": "",
    "summary": "Obtain the luminance value of a `UIColor` as interperated by a human eye.",
    "license": {
        "type": "MIT",
        "file": "UIColor+PerceivedLuminance.m"
    "authors": {
        "Max Howell": "[email protected]"
    "platforms": {
        "ios": null
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": "*.{h,m}",
    "requires_arc": false,
    "frameworks": "UIKit"

Pin It on Pinterest

Share This