//将UIColor转换为RGB值
- (NSMutableArray *) changeUIColorToRGB:(UIColor *)color
{
NSMutableArray*RGBStrValueArr = [[NSMutableArray alloc] init];
NSString*RGBStr = nil;
//获得RGB值描述
NSString*RGBValue = [NSString stringWithFormat:@"%@",color];
//将RGB值描述分隔成字符串
NSArray*RGBArr = [RGBValue componentsSeparatedByString:@" "];
//获取红色值
intr = [[RGBArr objectAtIndex:1] intValue] * 255;
RGBStr= [NSString stringWithFormat:@"%d",r];
[RGBStrValueArraddObject:RGBStr];
//获取绿色值
intg = [[RGBArr objectAtIndex:2] intValue] * 255;
RGBStr= [NSString stringWithFormat:@"%d",g];
[RGBStrValueArraddObject:RGBStr];
//获取蓝色值
intb = [[RGBArr objectAtIndex:3] intValue] * 255;
RGBStr= [NSString stringWithFormat:@"%d",b];
[RGBStrValueArraddObject:RGBStr];
//返回保存RGB值的数组
return[RGBStrValueArr autorelease];
}