contrast-color
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -7,3 +7,3 @@ { | ||
"repository": "busterc/contrast-color", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "lib/index.js", | ||
@@ -10,0 +10,0 @@ "files": [ |
@@ -23,21 +23,18 @@ # contrast-color [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] | ||
const ContrastColor = require('contrast-color'); | ||
const cc = ContrastColor({ | ||
bgColor: 'navy', | ||
fgDarkColor: 'water', | ||
fgLightColor: 'navy', | ||
fgDarkColor: '#0570E3', | ||
const cc = new ContrastColor({ | ||
bgColor: "navy", | ||
fgDarkColor: "navy", | ||
fgLightColor: "water", | ||
customNamedColors: { | ||
water: '#00D0FF' | ||
} | ||
water: "#00D0FF", | ||
}, | ||
}); | ||
const defaultFgColor = cc.contrastColor(); | ||
const inverseFgColor = cc.contrastColor({ bgColor: 'water' }); | ||
const hasAquaBgColor = cc.contrastColor({ bgColor: 'aqua' }); | ||
const hasAquaBgColor = cc.contrastColor({ bgColor: "aqua" }); | ||
/* Results | ||
{ | ||
defaultFgColor: '#000080', | ||
inverseFgColor: '#0570E3', | ||
hasAquaBgColor: '#0570E3' | ||
defaultFgColor: '#00D0FF', // water | ||
hasAquaBgColor: '#000080' // navy | ||
} | ||
@@ -69,8 +66,8 @@ */ | ||
{ | ||
hasRedBg: '#FFFFFF', | ||
hasRedBgWithBlackFg: '#000000', | ||
hasYellowBg: '#000000', | ||
hasWhiteBgWithGreenFg: '#008000', | ||
hasBlackBgWithLimeFg: '#00FF00', | ||
hasKitchenSink: '#ff99ff' | ||
hasRedBg: '#FFFFFF', // white | ||
hasRedBgWithBlackFg: '#000000', // black | ||
hasYellowBg: '#000000', // black | ||
hasWhiteBgWithGreenFg: '#008000', // green | ||
hasBlackBgWithLimeFg: '#00FF00', // lime | ||
hasKitchenSink: '#ff99ff' // clean | ||
} | ||
@@ -77,0 +74,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23810
173