Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

color

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

6

index.js

@@ -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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc