hexterm
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

hexterm

Get the xterm closest color to a hexadecimal color

Build Status npm version

Usage

Programatically

Install locally

npm install hexterm

Require 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') // 11

CLI

npx

npx hexterm 005fd7

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

Readme

Keywords

Package Sidebar

Install

npm i hexterm

Weekly Downloads

6

Version

2.0.1

License

MIT

Unpacked Size

9.79 kB

Total Files

9

Last publish

Collaborators

  • jacoborus