I need to set the header color for ffe1b1 to UIButton.RGB for ffe1b1 - 255,225,177. I am trying to use this code, but it is incorrectly reflected. I am searching on the net. Color components are floating values ββfrom 0.0 to 1.0! So, what is the right way to provide RGB values. thanks
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom] ; btn.frame = CGRectMake(134.0, 193.0, 80.0, 30.0); [btn setBackgroundImage:img forState:UIControlStateNormal]; [btn setTitle:@"Contact" forState:UIControlStateNormal]; [btn setTitleColor:[UIColor colorWithRed:255.0 green:225.0 blue:177.0 alpha:0.6 ]forState: UIControlStateNormal];
source share