File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,12 @@ extension UIColor {
7979 return
8080 }
8181
82- var value : UInt32 = 0
83- Scanner ( string: trimmed) . scanHexInt32 ( & value)
82+ var value : UInt64 = 0
83+ Scanner ( string: trimmed) . scanHexInt64 ( & value)
8484 self . init ( hex: value)
8585 }
8686
87- convenience init ( hex: UInt32 ) {
87+ convenience init ( hex: UInt64 ) {
8888 let r = ( hex & 0xff0000 ) >> 16
8989 let g = ( hex & 0xff00 ) >> 8
9090 let b = hex & 0xff
@@ -96,15 +96,15 @@ extension UIColor {
9696 )
9797 }
9898
99- var hex : UInt32 {
99+ var hex : UInt64 {
100100 var r : CGFloat = 0
101101 var g : CGFloat = 0
102102 var b : CGFloat = 0
103103 self . getRed ( & r, green: & g, blue: & b, alpha: nil )
104104
105- var value = UInt32 ( r * 0xff ) << 16
106- value = value | ( UInt32 ( g * 0xff ) << 8 )
107- value = value | UInt32 ( b * 0xff )
105+ var value = UInt64 ( r * 0xff ) << 16
106+ value = value | ( UInt64 ( g * 0xff ) << 8 )
107+ value = value | UInt64 ( b * 0xff )
108108 return value
109109 }
110110}
You can’t perform that action at this time.
0 commit comments