Socket
Socket
Sign inDemoInstall

ntcjs

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ntcjs

A Node CommonJS compatible wrapper for the Name That Color library (ntc js) - http://chir.ag/projects/ntc/


Version published
Weekly downloads
2.1K
decreased by-10.42%
Maintainers
1
Install size
60.0 kB
Created
Weekly downloads
 

Readme

Source

Name That Color

A Node CommonJS compatible wrapper for the Name That Color library (ntc js) - http://chir.ag/projects/ntc/

Installation

npm install ntcjs --save

Getting Started

const ntc = require('ntcjs');

const n_match = ntc.name('#6195ED');
n_rgb = n_match[0]; // RGB value of closest match
n_name = n_match[1]; // Text string: Color name
n_exactmatch = n_match[2]; // True if exact color match

console.log(n_match); // [ '#6495ED', 'Cornflower Blue', false ]

Live Demo

This is a live demo of the original ntcjs library

http://chir.ag/projects/name-that-color/#6195ED

Running the Tests

Make sure you install the necessary dev dependencies needed to run the tests:

npm install

Then run the tests

npm test

Disclaimer

All credit goes to Chirag Mehta for creating the original ntc.js library.

Keywords

FAQs

Last updated on 02 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc