在需要放#颜色的地方把 UIColor 替换成HexColor即可
label.color = HexColor(hex: 0xf82c88, alpha: 0.95)
其它位置使用下面的方法即可
func HexColor(hex:integer_t, alpha:CGFloat) -> UIColor
{
return UIColor(red: CGFloat((hex >> 16) & 0xff)/255.0, green: CGFloat((hex >> 8) & 0xff)/255.0, blue: CGFloat(hex & 0xff)/255.0, alpha: alpha)
}