代码:UIColor*color=[UIColorcolorWithHue:0.3saturation:0.2brightness:0.2alpha:1];CGFloatr,g,b,a;[colorgetRed:&rgreen:&gblue:&balpha:&a];NSData*colorData=[NSKeyedArchiverarchivedDataWithRootObject:color];UIColor*unarchivedColor=[NSKeyedUnarchiverunarchiveObjectWithData:colorData];[unarchivedColorget