Skip to content

Instantly share code, notes, and snippets.

@sprohaszka
Created April 28, 2011 13:01
Show Gist options
  • Select an option

  • Save sprohaszka/946300 to your computer and use it in GitHub Desktop.

Select an option

Save sprohaszka/946300 to your computer and use it in GitHub Desktop.
UIColor Category for RGB with value from 0 to 255
@implementation UIColor (RGB)
+ (UIColor*) colorIntWithRed:(int)red green:(int)green blue:(int)blue {
return [UIColor colorWithRed:red/255.0f green:green/255.0f blue:blue/255.0f alpha:1.0f];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment