In swift, colorLiteral can reflect color, is this more intuitive?

public static let facebook1 = #colorLiteral(red: 0.231372549, green: 0.3490196078, blue: 0.5960784314, alpha: 1)
I think it's a matter of taste. Personally I wouldn't focus on changing it, but happy to hear the thoughts of others.
I think it's more useful to see the component values in source code than a color swatch.
Thank you for your suggestion @fanglinwei, I see how color literals makes the code looks better in Xcode, however, I have to agree with @guykogus and @chulbert here for the following two reasons
Personally, i do this:
extension UIColor {
static let facebook: Color = 0x3B5998
but i have my Color in my personal project setup differently than here in SwifterSwift:
class Color: UIColor, ExpressibleByIntegerLiteral {
public required convenience init(integerLiteral value: IntegerLiteralType) {
let red = CGFloat((value & 0xFF0000) >> 16) / 255
let green = CGFloat((value & 0x00FF00) >> 8) / 255
let blue = CGFloat(value & 0x0000FF) / 255
self.init(red: red, green: green, blue: blue, alpha: 1)
}
}
I'm going to close this issue for now, feel free to open again to extend the discussion :)
Most helpful comment
I think it's more useful to see the component values in source code than a color swatch.