Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Latest commit

 

History

History
50 lines (41 loc) · 1.52 KB

README.md

File metadata and controls

50 lines (41 loc) · 1.52 KB

foreground

Determine whether a given background color will need a light or dark foreground

Current npm package version. Released under the MIT license. Current Github Action build status. Downloads per month on npm. Total downloads on npm. Follow @pqtdev

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