Advertisement
Guest User

Untitled

a guest
May 5th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. UIButton color change
  2. myButton.backgroundColor = [UIColor brownColor];
  3.  
  4. myButton.backgroundColor = [UIColor colorWithHue:1.0/12 saturation:2.0/3 brightness:4.0/10 alpha:1];
  5.  
  6. UIColor *color = UIColor.brownColor;
  7. CGFloat hue, saturation, brightness, alpha;
  8. [color getHue:&hue saturation:&saturation brightness:&brightness alpha:&alpha];
  9. brightness *= .8;
  10. UIColor *darkerColor = [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:alpha];
  11.  
  12. UIColor *myColor = [UIColor colorWithRed:0.5f green:0.5f blue:0.5f alpha:1.0f];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement