Skip to content

Instantly share code, notes, and snippets.

@bishalg
Created July 3, 2015 06:00
Show Gist options
  • Save bishalg/c8ede5ad49f0cf778dfb to your computer and use it in GitHub Desktop.
Save bishalg/c8ede5ad49f0cf778dfb to your computer and use it in GitHub Desktop.
Random Shades of Gray UIColor - iOS Objective-C
- (UIColor *)randomColor {
CGFloat white = ( arc4random() % 90 / 256.0 ) + 0.3; // 0.35 - 0.65
UIColor *color = [UIColor colorWithWhite:white alpha:1.0];
return color;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment