tasselx
7/11/2016 - 2:11 AM

NSColor randomColor

+ (NSColor *)gr_randomColor
{
    CGFloat red =  (CGFloat)random()/(CGFloat)RAND_MAX;
    CGFloat blue = (CGFloat)random()/(CGFloat)RAND_MAX;
    CGFloat green = (CGFloat)random()/(CGFloat)RAND_MAX;
    
    return [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:1.0];
}