% clg --help
OVERVIEW: clg, generates Color stuffs: Swift code, Objective-C code, Color Set, colors.xml, clr file, and JSON
USAGE: clg [--version] <subcommand>
OPTIONS:
-v, --version Print version
-h, --help Show help information.
SUBCOMMANDS:
clr generates clr file from input
json generates JSON from clr file OR CSV file OR ASE file a.k.a. "Adobe Swatch Exchange"
code generates Swift code, Objective-C code, Color Set, colors.xml from input
generates clr file from input
clg clr --output ~/Library/Colors sample.json
--output
,-o
- path for output directory
generates JSON from
- clr file
- CSV file
- ASE file a.k.a. "Adobe Swatch Exchange"
clg json --output sample.json ~/Library/Colors/sample.clr
clg json --output sample.json ~/somewhere/sample.ase
clg json --output sample.json ~/somewhere/sample.csv
CSV file format should be like below
<Color Name>,<Red 256>,<Green 256>,<Blue 256>
<Color Name>,<Red 256>,<Green 256>,<Blue 256>
<Color Name>,<Red 256>,<Green 256>,<Blue 256>
--output
,-o
- path for output
- use input file name if path is directory
- path for output
generates Swift code, Objective-C code, Color Set, colors.xml from input
clg code --output ~/somewhere/ --code swift sample.json
--output
,-o
- directory path for output
--type
,-t
- generate specific type of code file
swift
objc
colorset
android
- generate specific type of code file
--code
, -c
is deprecated. Use --type
, -t
option instead.
Requires macOS Catalina.
Using homebrew:
brew install griffin-stewie/clg/clg