Repository
Current version released
4 years ago
Versions
hexterm
Get the xterm closest color to a hexadecimal color.
It works in Node.js, Deno and browsers
Usage
Programatically
# only node.js
npm install hexterm// deno
import { hexterm } from "https://deno.land/x/hexterm/src/hexterm.ts";
// node.js
import { hexterm } from "hexterm";
hexterm("005fd7"); // 26
hexterm("#005fd7"); // 26
hexterm("005ED9"); // 26
hexterm("ff0"); // 11
hexterm("#ff0"); // 11CLI
Install globally
# deno
deno install -n hexterm https://deno.land/x/hexterm/src/cli.ts
# node
npm install -g hextermCall from your shell: hexterm <color>
hexterm 005fd7Remember to wrap the color code between quotes if has numeral prefix (#)
hexterm '#ff0'Alternatively, you can call hexterm using npx
npx hexterm 005fd7Test
Install dev-dependencies and run tests
npm install && npm tstDevelopment
Use VR (Velociraptor) to run the scripts
© 2016-2020 Jacobo Tabernero - Released under MIT License