foreground
Determine whether a given background color will need a light or dark foreground
Installation
npm install @pqt/foreground
# OR
yarn add @pqt/foreground
Usage
import { foreground } from "@pqt/foreground";
foreground("fff"); // => returns "dark"
foreground("000"); // => returns "light"
foreground("005cc5"); // => returns "light"
License
MIT