What UIColor is this button?

Discussion in 'iOS Programming' started by dantastic, Mar 2, 2011.

  1. dantastic macrumors 6502

    dantastic

    Joined:
    Jan 21, 2011
    #1
    See screenie, what UIColor is the button please?

    I've a uisegmentedcontrol I need to set the same colour for but I can't seem to get it right :(
     

    Attached Files:

  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Maybe this

    Code:
    +(UIColor*)tableViewBlue
    {
    	static UIColor*	color = nil;
    
    	if (! color)
    		color = [[UIColor alloc] initWithRed:50.0f/255.0f green:79.0f/255.0f blue:133.0f/255.0f alpha:1.0f];
    	return color;
    }
    If that's the tint color or the color of some text or other control you should be able to print it out.
     
  3. dantastic thread starter macrumors 6502

    dantastic

    Joined:
    Jan 21, 2011
    #3
    that's a very dark grey colour.

    The colour I want is sitting on a uibarbuttonitem and I can't seem to be able to access the tintcolor of that object. good thinking though!
     
  4. dantastic thread starter macrumors 6502

    dantastic

    Joined:
    Jan 21, 2011
    #4
    We have a winner
    Code:
    [UIColor colorWithRed:(117.0/255.0) green:(143.0/255.0) blue:(179.0/255.0) alpha:1];
    
    I used the built in tool to tell me the colour. Just giving that colour didn't do it but I was able to the use the tool and compare the colour of the button to my own button.

    sorted!
     

Share This Page