Colorcue is a web application and a command-line tool that allows you to encode colors into easy-to-remember word couples reminiscent of the color.
Colorcue is a web application and a command-line tool that allows you to encode colors into easy-to-remember word couples reminiscent of the color.
# Prerequisites
Before starting, you must be equipped with the following:
- build NodeJS Version 6 and higher link Download NodeJS
- local_library A (big) wordlist To draw from during encoding. file_download Download wordlist
# Installing
You can install colorcue automatically with NPM, or build the application manually.
With NPM
You may need to run this command as root/administrator.
> npm install -g colorcue
Building by hand
Git is needed to clone the repository.
> git clone https://github.com/loganbraga/colorcue
> cd colorcue
> npm install
> npm run build && npm test
You may want to symlink the folder into your executable path, or make an alias of the command to launch the application (node <path to folder>
) for easier use.
# Setting up
Before starting using colorcue, you need to generate the words database used during encoding:
> colorcue gendb <path to the wordlist file>
That's it! You're ready to use colorcue.
Colorcue is a web application and a command-line tool that allows you to encode colors into easy-to-remember word couples reminiscent of the color.
# Preface
Make sure you followed installation instructions and correctly generated the words database before continuing.
You can display the global help by using the colorcue --help
command, and subcommand-specific help with colorcue <subcommand> --help
.
You can also find detailed and technical documentation on the Github project page.
Troubleshooting
If your version of NodeJS is too old, colorcue may not work properly. You can force the use of a compatibility mode, which comes at the cost of a slower startup time, with the --polyfill
option.
If your terminal does not correctly display ANSI color code escape sequences, you can disable them with the -c
or --no-colors
option.
If you would like to pipe colorcue output into another program or service, you can disable unecessary noise with the -q
or --quiet
option.
# Encoding
Encoding is done with the encode
command applied on a color.
> colorcue encode '#c6242c'
=> rosewood bundles
You can specify the -a
or --all
option to retrieve all tuples from the database that can encode the color:
> colorcue encode '#c6242c' -a
=> rosewood bundles
=> rosewood idiots
=> rosewood stern
=> rosewood entangle
=> ...
The color to encode can be supplied in various formats. Most of the time, colorcue can guess the format in use, but you can also specify it with the --format
option:
> colorcue encode 'rgb(12, 88, 145)'
> colorcue encode 'hsl(188, 83, 45)'
> colorcue encode forestgreen
> colorcue encode 12,88,145 --format rgb
# Decoding
Decoding is done with the decode
command applied on a words tuple.
Note that the case of the words does not matter, but the order of the words is significant (except for shades of gray colors).
> colorcue decode MySpace employee
=> #113DEE
You can also specify an output color format:
> colorcue decode MySpace employee --format keyword
=> blue
> colorcue decode rosewood bundles --format hsl
=> hsl(357, 69, 46)
# Database generation
You can (re)generate the words database with the gendb
command:
> colorcue gendb path_to_the_wordlist.txt
After generating a database, you can check that it contains enough different words and with a wide enough distribution with the command check
:
> colorcue check
=> Number of words : 40302
=> Number of scores : 5102
=> Number of required scores : 5102
=> Words per (required) score : ~7.9 ([1,21])
=> Enough words. Congrats!