/vimcolors

Find approximate vim-compatible (cterm) colors.

Primary LanguageRubyMIT LicenseMIT

vim-colors

Find approximate cterm-compatible colors.

Usage

You can pass hex colors via arguments or pipe them from other commands.

$ ./bin/vimcolors "#00ee00"
# or pipe them to handle several colors at once
$ cat colors.txt
base0,#0c141f
base1,#091f2e
base2,#152730
$ cut -d, -f2 < colors.txt | ./bin/vimcolors

NOTE: you may need to quote arguments as they may be treated as comments because of the initial #.

Other projects

Projects I used as inspiration or from which I straight-off ripped code from:

TODO

  • Add tests
    • Add tests for command invocation
    • Add tests to make sure color comparisons do NOT break
  • Add HSL support
  • Add UNIX pipe support