2.0.1 • Published 5 years ago
hexterm v2.0.1
hexterm
Get the xterm closest color to a hexadecimal color
Usage
Programatically
Install locally
npm install hextermRequire hexterm and pass a string to it
import hexterm from 'hexterm'
hexterm('005fd7') // 26
hexterm('#005fd7') // 26
hexterm('005ED9') // 26
hexterm('ff0') // 11
hexterm('#ff0') // 11CLI
npx
npx hexterm 005fd7Install globally
npm install -g hextermCall from your shell: hexterm <color>
hexterm 005fd7Remember to wrap the color code between quotes if has numeral prefix (#)
hexterm '#ff0'Test
Install dev-dependencies and run tests
npm install && npm tst© 2016-2020 Jacobo Tabernero - Released under MIT License