I commited some code to this awesome github repository: Colours-for-iOSIt returns [UIColor black] or [UIColor white] based on which one contrasts best with your current UIColor object.

Just throw the UIColor+Colours.h/m into your project and include the .h in any file in which you use UIColor. To use my new method, simply create a UIColor object and call it’s blackOrWhiteContrastingColor method. It returns a black or white UIColor object which you can then for example, use to change font/text color which is displayed over the original color object.