This is a library to convert existing terminal color schemes in Tilix compatibly color schemes.
Tilix uses json in to save color schemes. This library provides a struct TilixColor which is responsible to the translation.
The library also provides an interface, Paletter, to allow the creation of parsers. Parses will used by NewTilixColor function which is in charge to provide a correct TilixColor struct.
Generally a conversion process uses a list of input files, an output directory where to save results and a set of instruction to translate input files to output ones. For this reason the library provides CreateBatch function which given a FncTransformer transform function, translates files for Tilix color schemes.
The library provides a parser (itermcolors_parser.go) in order to translate iTerm color schemes in Tilix color schemes.
The CLI tool (convert.go) provided by the library allow you to convert Iterm color schemes and can be used as an example to create your own color scheme translator.
To get cli tool for conver .itermcolors schema file into Tilix color scheme, install the tool using:
go get -u github.com/tux-eithel/color4tilix/...
download the iTerm2 schemes from here https://iterm2colorschemes.com/ and then run iterm2tilix -d dir_with_itermcolors_files (they are inside schemes folder).
You can find inside release Tilix color schemes translated starting from Iterm2-color-schemes.
After the download, copy the json files inside ~/.config/tilix/schemes directory.
If you'd like to transform another terminal schemes into Tilix color schemes, (and you're fine with CreateBatch workflow) you should do:
- define a new struct which implements
Paletterinterface - provide a compatible
FncTransformerfunction to transform input files - use the (convert.go) as base