Saving color palette doesn't work
artemnovichkov opened this issue · 2 comments
artemnovichkov commented
Version of Zepcode:
0.5.0
Generated snippet:
import UIKit
extension UIColor {
convenience init(r red: Int, g green: Int, b blue: Int, a: CGFloat = 1) {
self.init(red: CGFloat(red) / 255, green: CGFloat(green) / 255, blue: CGFloat(blue) / 255, alpha: a)
}
static let dodgerBlue = UIColor(red: 72/255, green: 171/255, blue: 255/255, alpha: 1)
}
What's wrong:
Can't save snippet into file.
dirtybit commented
It crashes since the second argument of generateColorExtension
is missing here:
Lines 103 to 105 in 6eecca3
I guess options(context)
is also required for this function to run properly.
artemnovichkov commented
@dirtybit, you're right! Thank you!