Prefix
Closed this issue · 1 comments
SeRG1k17 commented
Why this:
guard rgba.hasPrefix("#") else {
throw UIColorInputError.missingHashMarkAsPrefix
}
let hexString: String = String(rgba[String.Index.init(encodedOffset: 1)...])
//...
Not:
var hexString = rgba
if hexString.hasPrefix("#") {
hexString = String(hexString.dropFirst())
}
//...
yeahdongcn commented
Thank you for fixing this.