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

1.2.2 • Public • Published

react-ntc

React Hooks module for the Name That Color project.

npm version npm-publish npm downloads

Installation

To install react-ntc with npm:

npm install react-ntc

To install react-ntc with yarn:

yarn add react-ntc

Types

interface ColorMap {
    [key: string]: string;
}
 
interface ColorObject {
    name: string;
    hex: string;
}
 
type ColorTuple = [hexstring, namestring];

Hooks

useColors()
 
useColorObjects()
 
useColorTuples()
 
useLookupColors(hexValuesstring[])
 
useLookupColorObjects(hexValuesstring[])
 
useLookupColorTuples(hexValuesstring[])
 
useNameThatColor(hexValuestring)

Functions

formatHex(hexstring)
 
formatHexValues(hexValuesstring)

Demo

View demo here: https://alehechka.github.io/react-ntc/

License

This project is licensed under the terms of the MIT license.

Package Sidebar

Install

npm i react-ntc

Weekly Downloads

30

Version

1.2.2

License

MIT

Unpacked Size

398 kB

Total Files

12

Last publish

Collaborators

  • alehechka