感谢您的解决方案.
float r; float g; float b; float a; [UIColor colorWithRed:r/255.f green:g/255.f blue:b/255.f alpha:a/255.f];