Comparing version 2.0.1 to 3.0.0
@@ -287,3 +287,3 @@ 'use strict'; | ||
dark: function () { | ||
isDark: function () { | ||
// YIQ equation from http://24ways.org/2010/calculating-color-contrast | ||
@@ -295,4 +295,4 @@ var rgb = this.rgb().color; | ||
light: function () { | ||
return !this.dark(); | ||
isLight: function () { | ||
return !this.isDark(); | ||
}, | ||
@@ -299,0 +299,0 @@ |
{ | ||
"name": "color", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Color conversion and manipulation with CSS string support", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -34,2 +34,4 @@ # color [![Build Status](https://travis-ci.org/Qix-/color.svg?branch=master)](https://travis-ci.org/Qix-/color) | ||
String constructors are handled by [color-string](https://www.npmjs.com/package/color-string) | ||
### Getters | ||
@@ -80,4 +82,4 @@ ```js | ||
```js | ||
color.light(); // true | ||
color.dark(); // false | ||
color.isLight(); // true | ||
color.isDark(); // false | ||
``` | ||
@@ -84,0 +86,0 @@ Get whether the color is "light" or "dark", useful for deciding text color. |
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
16126
115