You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this with PaintCode, which can export StyleKit classes that have colors. The only modification necessary to the PaintCode export file is to add the paletteName class func. I'm going to send an email to the PaintCode team to see if they might be able to add the paletteName func to their export template, but if not adding it manually isn't too difficult. As an aside, it would be cool if Crayons could detect a StyleKit file and index it with a standard name without needing the paletteName func.
Aside from that, PaintCode exports colors like this:
//// Cache
private struct Cache {
static let themeRedColor: UIColor = UIColor(red: 0.835, green: 0.208, blue: 0.282, alpha: 1.000)
static let themeGreenColor: UIColor = UIColor(red: 0.090, green: 0.592, blue: 0.467, alpha: 1.000)
static let themeYellowColor: UIColor = UIColor(red: 0.965, green: 0.620, blue: 0.439, alpha: 1.000)
}
//// Colors
public class var themeRedColor: UIColor { return Cache.themeRedColor }
public class var themeGreenColor: UIColor { return Cache.themeGreenColor }
public class var themeYellowColor: UIColor { return Cache.themeYellowColor }
But Crayons needs this:
public class func testColor() -> UIColor { return Cache.themeGreenColor }
Is there a way to get Crayons to see these class vars and index them accordingly?
The text was updated successfully, but these errors were encountered:
You got it :)
The only thing I can't do is automatically index StyleKit files, as they contain a generic NSObject and no recognisable feature (and the name can be anything).
Since I can't index every class that exposes colors, at this point the only way is to manually add the palette name to the class.
I'm trying to use this with PaintCode, which can export StyleKit classes that have colors. The only modification necessary to the PaintCode export file is to add the paletteName class func. I'm going to send an email to the PaintCode team to see if they might be able to add the paletteName func to their export template, but if not adding it manually isn't too difficult. As an aside, it would be cool if Crayons could detect a StyleKit file and index it with a standard name without needing the paletteName func.
Aside from that, PaintCode exports colors like this:
But Crayons needs this:
Is there a way to get Crayons to see these class vars and index them accordingly?
The text was updated successfully, but these errors were encountered: