PDA

View Full Version : How to make color 10% darker?




pashik
Nov 14, 2008, 09:41 AM
Hi.
I have code to decrease alpha:


UIColor* icolor = [_parent color];
if(icolor)
{
CGFloat alpha = CGColorGetAlpha([icolor CGColor]);
_color = [[icolor colorWithAlphaComponent:alpha*0.75] retain];
}


I found only initWithHue method but it is used to initialize new color and not change current color

How i can make color _color 10% darker?
thanx