Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

random-color-pair

benrosen15CC01.0.5

Generate two random colors: one darker and one lighter.

random color, background color, foreground color, palette

readme

random-color-pair

npm GitHub npm bundle size Maintenance npm GitHub issues GitHub pull requests

Generate two random colors: one darker and one lighter.

Quickstart

Install the package:

npm i random-color-pair

Import the function:

const getColorPair = require("random-color-pair");

// OR

import getColorPair from "random-color-pair";

Get the colors:

const [foreground, background] = getColorPair();