This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
OlderNewer