Miss any of our Open RFC calls?Watch the recordings here! »

@pqt/foreground

1.0.3 • Public • Published

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

Keywords

none

Install

npm i @pqt/foreground

DownloadsWeekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.11 kB

Total Files

5

Last publish

Collaborators

  • avatar
  • avatar