diff --git a/DcCore/DcCore/Extensions/UIColor+Extensions.swift b/DcCore/DcCore/Extensions/UIColor+Extensions.swift index b06bd8265..0bb7654a2 100644 --- a/DcCore/DcCore/Extensions/UIColor+Extensions.swift +++ b/DcCore/DcCore/Extensions/UIColor+Extensions.swift @@ -22,9 +22,9 @@ public extension UIColor { // see: https://stackoverflow.com/a/33397427 convenience init(hexString: String) { let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) - var int = UInt32() - Scanner(string: hex).scanHexInt32(&int) - let a, r, g, b: UInt32 + var int = UInt64() + Scanner(string: hex).scanHexInt64(&int) + let a, r, g, b: UInt64 switch hex.count { case 3: // RGB (12-bit) (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)