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

nano-color

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nano-color - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

35

index.js

@@ -285,2 +285,20 @@ "use strict";

function color(x) {
return [
line[0][0]*ix + line[0][1] +.5 | 0,
line[1][0]*ix + line[1][1] +.5 | 0,
line[2][0]*ix + line[2][1] +.5 | 0,
line[3][0]*ix + line[3][1] +.5 | 0
];
}
function mix(f, c1, c2) {
var nf = 1.-f;
return [
c1[0]*f + c2[0]*nf +.5 | 0,
c1[1]*f + c2[1]*nf +.5 | 0,
c1[2]*f + c2[2]*nf +.5 | 0,
c1[3]*f + c2[3]*nf +.5 | 0
];
};
var w = pos_b - pos_a, i = 0, x1, c1, x2, c2, c = [], line = [];

@@ -297,19 +315,2 @@ for (var p in gr) {

function color(x) {
return [
line[0][0]*ix + line[0][1] +.5 | 0,
line[1][0]*ix + line[1][1] +.5 | 0,
line[2][0]*ix + line[2][1] +.5 | 0,
line[3][0]*ix + line[3][1] +.5 | 0
];
}
function mix(f, c1, c2) {
var nf = 1.-f;
return [
c1[0]*f + c2[0]*nf +.5 | 0,
c1[1]*f + c2[1]*nf +.5 | 0,
c1[2]*f + c2[2]*nf +.5 | 0,
c1[3]*f + c2[3]*nf +.5 | 0
];
};
for (var ix = (x1+.9999)|0, ie = x2|0; ix < ie; ++ix)

@@ -316,0 +317,0 @@ callback.call(this, ix, color(ix));

{
"name": "nano-color",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"keywords" : [ "HSV", "RGB", "RGBA", "hsv-filter", "coloring-filter", "gradient" ],
"main": "index.js",

@@ -14,2 +15,3 @@ "scripts": {

"devDependencies": {
"core-assert": "0",
"mocha": "2",

@@ -16,0 +18,0 @@ "colors": "0",

var c = require('../index.js'),
assert = require('assert');
assert = require('core-assert');

@@ -4,0 +4,0 @@ var timer = function (ms, v) {

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