Skip to content

Commit

Permalink
Merge pull request #5 from chuyik/update-node-modules
Browse files Browse the repository at this point in the history
use latest chroma to replace euclidean-distance
  • Loading branch information
zeke committed Jul 7, 2017
2 parents 6c238a2 + af79f0a commit 99f795c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

var distance = require('euclidean-distance')
var chroma = require('chroma-js')
var color
var key
Expand All @@ -22,7 +21,7 @@ var namer = module.exports = function(color) {
for (key in lists) {
results[key] = lists[key]
.map (function(name) {
name.distance = distance(color.lab(), chroma(name.hex).lab())
name.distance = chroma.distance(color, chroma(name.hex))
return name
})
.sort (function(a, b) {
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
"mocha": "~1.13.0"
},
"dependencies": {
"chroma-js": "~0.5.2",
"euclidean-distance": "~0.1.0",
"require-dir": "^0.3.0"
"chroma-js": "^1.3.4"
}
}

0 comments on commit 99f795c

Please sign in to comment.