From 950675da53170582b9ff3263cfc88f12b60c24b2 Mon Sep 17 00:00:00 2001 From: Tristan Himmelman Date: Thu, 21 Sep 2017 15:55:16 -0700 Subject: [PATCH] Bug fix --- Sources/HexColorTransform.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/HexColorTransform.swift b/Sources/HexColorTransform.swift index dd9299f9..9053909a 100644 --- a/Sources/HexColorTransform.swift +++ b/Sources/HexColorTransform.swift @@ -36,7 +36,7 @@ open class HexColorTransform: TransformType { if let rgba = value as? String { if rgba.hasPrefix("#") { let index = rgba.characters.index(rgba.startIndex, offsetBy: 1) - let hex = rgba.substring(from: index) + let hex = String(rgba[index...]) return getColor(hex: hex) } else { return getColor(hex: rgba)