Skip to content

Instantly share code, notes, and snippets.

View florianbuerger's full-sized avatar
🐳
🏃‍♂️💨 🧗‍♂️👨‍💻🔁

Florian Bürger florianbuerger

🐳
🏃‍♂️💨 🧗‍♂️👨‍💻🔁
View GitHub Profile
public struct CodableColor: Codable {
public var red: CGFloat = 0
public var green: CGFloat = 0
public var blue: CGFloat = 0
public var alpha: CGFloat = 1.0
public var colorSpace: String
init(cgColor color: CGColor) {
let comps = color.components!
red = comps[0]