color-pairs-picker
Given a color, it picks a pleasing and well contrasted background and foreground colors
Last updated 9 years ago by kylemathews .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install color-pairs-picker 
SYNC missed versions from official npm registry.

BuildStatus

color-pairs-picker

Given a color, it picks a pleasing and well contrasted background and foreground colors

Demo

http://kyleamathews.github.io/color-pairs-picker/

Install

npm install color-pairs-picker

Usage

This module attempts to pick pleasing color pairs that satisfy the following constraints:

  • Contrast > 4.5 for easy readability
  • Avoid pure blacks and pure whites.
  • Keep the background color > 0.15 luminance
var colorPairsPicker = require 'color-pairs-picker';

var baseColor = "#BA55D3";

var pair = colorPairsPicker(baseColor);

// Set a higher contrast over the default 5.5.
// Note, the more saturated your colors the less contrasty they'll be.
var pair = colorPairsPicker(baseColor, {contrast: 8});

Current Tags

  • 1.3.6                                ...           latest (8 years ago)

14 Versions

  • 1.3.6                                ...           8 years ago
  • 1.3.5                                ...           9 years ago
  • 1.3.4                                ...           9 years ago
  • 1.3.3                                ...           9 years ago
  • 1.3.2                                ...           9 years ago
  • 1.3.1                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (13)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE