Cli For Colorhelper

Hi folks. This is a quick command line interface for my premier color helper web service. Basically you give it some text, it thinks for a bit, then it spits out the exact color that corresponds with the text you gave it.

Installation

To install, just paste this into a terminal and hit enter (if you’re on a Mac, you probably want .bash_profile instead of .bashrc).

Installation script
sudo echo "function ch { args=\$@; color=\${args// /%20}; curl http://colorhelper.herokuapp.com/api/cli/\$color; }" >> ~/.bashrc && source ~/.bashrc

To uninstall, just remove the function definition line from ~/.bashrc.

Usage

To use the helper, just type ch [word or words you want turned into a color].

For example, ch hello world would output #5eb63b (No new line character at the end so it might end up looking a bit odd just in the terminal).

Some examples:

  • ch hello world | xcopy
    Pipe the color to your clipboard for later use (on a Mac, use pbcopy).

  • yes `ch hello world` > ~/Desktop/tang.txt
    Write a really big file to your desktop.

  • ch hello world | banner (This one only works on a Mac)
    See a really, really big version of the output.

Have fun, all!