The colors parser supports multiple input file types:
- CLR: NSColorList palette file (see docs). When you create color palettes in image editors or in Xcode, these are stored in
~/Library/Colors. - JSON: Simple root object where each key is the name, each value is a hex color string.
- TXT: Each line has a name and a color, separated by a
:. A color can either be a color hex value, or the name of another color in the file. - XML: Android colors.xml file parser (see docs).
The output context has the following structure:
palettes:Arrayof:name:String— name of the palettecolors:Arrayof:name:String— name of each colorred:String— hex value of the red componentgreen:String— hex value of the green componentblue:String— hex value of the blue componentalpha:String— hex value of the alpha component