NSColor+ContrastingLabelExtensions
A quick Cocoa source code post. This one is simple: it’s a category on NSColor which returns another NSColor for use when drawing label text on top of the receiver. Either white or black is returned, depending on which will have most visual contrast with the receiver’s color. In the event of the receiver’s colorspace [...]