Socket
Socket
Sign inDemoInstall

major-colors

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

4

package.json
{
"name": "major-colors",
"version": "0.1.2",
"version": "0.1.3",
"description": "color segmentation using kmeans+++ for clustering and CIEDE2000 algorithm for color distance",
"main": "dist/lib.js",
"module": "src/index.js",
"jsnext:main": "src/index.js",
"scripts": {

@@ -7,0 +9,0 @@ "test": "echo \"Error: no test specified\" && exit 1",

@@ -62,3 +62,4 @@ import ciede2000 from "./dE00";

const cluster = new KMeansCluster({ distanceFn: distance, maximumIterations: 20, convergedFn: centroidsConverged(JND) });
const { model: { centroids, assignments } } = cluster.cluster(pixelData, numberOfColors);
const clusterResult = cluster.cluster(pixelData, numberOfColors);
const { model: { centroids, assignments } } = clusterResult;
let order = countBy(assignments);

@@ -65,0 +66,0 @@ order = sortBy(Object.entries(order), i => -i[1]);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc