Skip to content

Commit 43a283d

Browse files
author
JWI
committed
maybe this is what it was
1 parent 585f253 commit 43a283d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Sources/UIKitBackend/UIColor+Color.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension Color {
3030
}
3131

3232
var cgColor: CGColor {
33-
if #available(iOS 13.0, *) {
33+
/*if #available(iOS 13.0, *) {
3434
CGColor(
3535
red: CGFloat(red),
3636
green: CGFloat(green),
@@ -39,12 +39,10 @@ extension Color {
3939
)
4040
} else {
4141
//MARK: this won't work right now, get back to me on it.
42-
CGColorShim(
43-
red: CGFloat(red),
44-
green: CGFloat(green),
45-
blue: CGFloat(blue),
46-
alpha: CGFloat(alpha)
47-
) as! CGColor
48-
}
42+
43+
}*/
44+
let colorSpace = CGColorSpaceCreateDeviceRGB()
45+
let components: [CGFloat] = [CGFloat(red), CGFloat(green), CGFloat(blue), CGFloat(alpha)]
46+
return CGColor(colorSpace: colorSpace, components: components)!
4947
}
5048
}

0 commit comments

Comments
 (0)