diff --git a/Sources/SwiftUICharts/Helpers.swift b/Sources/SwiftUICharts/Helpers.swift index d6b4b78..9f7e929 100644 --- a/Sources/SwiftUICharts/Helpers.swift +++ b/Sources/SwiftUICharts/Helpers.swift @@ -143,9 +143,9 @@ class TestData{ extension Color { init(hexString: String) { let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) - var int = UInt32() - Scanner(string: hex).scanHexInt32(&int) - let r, g, b: UInt32 + var int = UInt64() + Scanner(string: hex).scanHexInt64(&int) + let r, g, b: UInt64 switch hex.count { case 3: // RGB (12-bit) (r, g, b) = ((int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)