react-ntc
v1.2.2
Published
React Hooks for 'Name That Color' project.
Maintainers
Readme
react-ntc
React Hooks module for the Name That Color project.
Installation
To install react-ntc with npm:
npm install react-ntcTo install react-ntc with yarn:
yarn add react-ntcTypes
interface ColorMap {
[key: string]: string;
}
interface ColorObject {
name: string;
hex: string;
}
type ColorTuple = [hex: string, name: string];Hooks
useColors()
useColorObjects()
useColorTuples()
useLookupColors(hexValues: string[])
useLookupColorObjects(hexValues: string[])
useLookupColorTuples(hexValues: string[])
useNameThatColor(hexValue: string)Functions
formatHex(hex: string)
formatHexValues(hexValues: string)Demo
View demo here: https://alehechka.github.io/react-ntc/
License
This project is licensed under the terms of the MIT license.
