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