Socket
Socket
Sign inDemoInstall

color

Package Overview
Dependencies
Maintainers
1
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 0.4.4 to 0.5.0

browser.js

6

color.js

@@ -267,3 +267,7 @@ /* MIT license */

return this.rgb();
}
},
clone: function() {
return new Color(this.rgb());
},
}

@@ -270,0 +274,0 @@

44

package.json
{
"name": "color",
"description": "Color conversion and manipulation with CSS string support",
"version": "0.4.4",
"author": "Heather Arthur <fayearthur@gmail.com>",
"repository": {
"type": "git",
"url": "http://github.com/harthur/color.git"
},
"main": "./color",
"dependencies": {
"color-convert": "0.2.x",
"color-string": "0.1.x"
},
"devDependencies": {
"browserify": ">=1.1.0",
"uglify-js": "1.0.x"
},
"keywords": ["color", "colour", "css"]
}
"name": "color",
"description": "Color conversion and manipulation with CSS string support",
"version": "0.5.0",
"author": "Heather Arthur <fayearthur@gmail.com>",
"repository": {
"type": "git",
"url": "http://github.com/harthur/color.git"
},
"main": "./color",
"dependencies": {
"color-convert": "0.2.x",
"color-string": "0.1.x"
},
"devDependencies": {
"nomnom": "~1.5.2",
"browserify": "~2.18.1",
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0"
},
"keywords": [
"color",
"colour",
"css"
]
}

@@ -15,3 +15,3 @@ # color

### browser
Download the latest [color.js](http://github.com/harthur/color/downloads). The `Color` object is exported.
Download the latest [color.js](https://github.com/harthur/color/tree/gh-pages). The `Color` object is exported.

@@ -112,2 +112,10 @@ ### node

### Clone
You can can create a copy of an existing color object using `clone()`:
```javascript
color.clone() // -> New color object
```
And more to come...

@@ -114,0 +122,0 @@

@@ -131,1 +131,7 @@ var Color = require("../color"),

assert.deepEqual(Color("yellow").mix(Color("grey").alpha(0.5)).rgbaArray(), [223, 223, 32, 0.75]);
// Clone
var clone = Color({r: 10, g: 20, b: 30});
assert.deepEqual(clone.rgbaArray(), [10, 20, 30, 1]);
assert.deepEqual(clone.clone().rgb(50, 40, 30).rgbaArray(), [50, 40, 30, 1]);
assert.deepEqual(clone.rgbaArray(), [10, 20, 30, 1]);
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