To run the example project, clone the repo, and run pod install
from the Example directory first.
macOS 10.13+
ColorsetCreator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ColorsetCreator'
let colorsTest = [
Color(name: "Color1", nsColor: NSColor.red),
Color(name: "Color2", nsColor: NSColor.black),
Color(name: "Color3", nsColor: NSColor(deviceRed: 50/255, green: 168/255, blue: 82/255, alpha: 1.0)),
Color(name: "Color4", nsColor: NSColor.green),
]
let destinationFolderURL = ...
do {
try ColorsetCreator.generateXCAsset(fromColorsWithNames: colorsTest,
inFolder: destinationFolderURL,
assetName: "ColorsetCreatorTest",
force: true)
} catch {
print("Error: \(error)")
}
Federico Cappelli (info@federicocappelli.net)
ColorsetCreator is available under the MIT license. See the LICENSE file for more info.