Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hexterm

1.2.0 • Public • Published

hexterm

Get the xterm closest color to a hexadecimal color

Usage

Programatically

Install locally

npm install hexterm

Require hexterm and pass a string to it

const hexterm = require('hexterm')
 
hexterm('005fd7') // 26
hexterm('#005fd7') // 26
hexterm('005ED9') // 26
hexterm('ff0') // 11
hexterm('#ff0') // 11

CLI

Install globally

npm install -g hexterm

Call from your shell: hexterm <color>

hexterm 005fd7

Remember 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 Jacobo Tabernero - Released under MIT License

install

npm i hexterm

Downloadsweekly downloads

3

version

1.2.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar