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)