added color helper

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-06-15 18:50:39 -05:00
parent bbdf496cda
commit f8bffa7981

View File

@ -119,4 +119,11 @@ extension UIColor {
guard let _ = found else { return false}
return true
}
public func toVDSColor() -> VDSColor? {
guard let hex = hexString else { return nil }
let found = VDSColor.allCases.first{ $0.uiColor.hexString == hex }
guard let found else { return nil}
return found
}
}