The colorWithRed:green:blue:alpha:
method of the UIColor
class takes parameters in the range 0.0 to 1.0. You probably just need to divide all the values (except alpha) by 255.0f
:
UIColor* boxColour = [UIColor colorWithRed:217/255.0f green:37/255.0f blue:70/255.0f alpha:1.0f];