import HandyUIKit
let color = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
// create a new UIColor object with a specific luminance (slightly lighter)
color.change(.luminance, to: 0.7)
还有一个选项是应用 相对变化(建议) :
// create a new UIColor object with slightly darker color
color.change(.luminance, by: -0.2)