New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

color-forge

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-forge - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

6

index.js

@@ -248,3 +248,3 @@ 'use strict';

var brightness = newColor.values[index] + amount * (max - min) / 2;
var brightness = newColor.values[index] + amount * (max - min);
// Clip brightness to bounds

@@ -269,2 +269,6 @@ newColor.values[index] = Math.min(max, Math.max(min, brightness));

Color.prototype.darken = function darken(amount, mode) {
if (amount === undefined) {
amount = 0.1; // Otherwise will be NaN in #lighten
}
return this.lighten(-amount, mode);

@@ -271,0 +275,0 @@ };

2

package.json
{
"name": "color-forge",
"version": "1.0.8",
"version": "1.0.9",
"description": "A simple color system based on the work of https://github.com/dfcreative/color-space",

@@ -5,0 +5,0 @@ "url": "https://github.com/jacobp100/color-forge",

@@ -80,6 +80,6 @@ /* eslint-env node, mocha */

});
// Conformance with http://sassmeister.com (where 25 on there is 0.5 here)
// Conformance with http://sassmeister.com (where 25 on there is 0.25 here)
it('Should darken colours via rgb', function() {
assert.about(Color.hex('#fff').darken(0.5), Color.hex('#bfbfbf'));
assert.about(Color.hex('#f80').darken(0.5), Color.hex('#804400'));
assert.about(Color.hex('#fff').darken(0.5), Color.hex('#808080'));
assert.about(Color.hex('#f80').darken(0.5), Color.hex('#000000'));
assert.about(Color.hex('#000').darken(0.5), Color.hex('#000000'));

@@ -89,4 +89,4 @@ });

assert.about(Color.hex('#fff').lighten(0.5), Color.hex('#ffffff'));
assert.about(Color.hex('#f80').lighten(0.5), Color.hex('#ffc380'));
assert.about(Color.hex('#000').lighten(0.5), Color.hex('#404040'));
assert.about(Color.hex('#f80').lighten(0.5), Color.hex('#ffffff'));
assert.about(Color.hex('#000').lighten(0.5), Color.hex('#808080'));
});

@@ -93,0 +93,0 @@ it('Should add colours', function() {

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