How to make color 10% darker?

Discussion in 'iPhone/iPad Programming' started by pashik, Nov 14, 2008.

  1. macrumors member

    Joined:
    Jul 16, 2008
    #1
    Hi.
    I have code to decrease alpha:

    Code:
    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
     

Share This Page