Skip to content
Snippets Groups Projects
Commit 8877b4bd authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Make UIColor extension public

parent 04fa54c2
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,11 @@
import UIKit
extension UIColor {
public extension UIColor {
convenience init(hexString: String, alpha: CGFloat = 1) {
self.init(hex: UInt(hexString.hasPrefix("#") ? String(hexString.dropFirst()) : hexString, radix: 16) ?? 0, alpha: alpha)
}
convenience init(hex: UInt, alpha: CGFloat = 1) {
self.init(red: .init((hex & 0xff0000) >> 16) / 255,
green: .init((hex & 0xff00 ) >> 8) / 255,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment