(color1, color2)
| 304 | } |
| 305 | |
| 306 | function getColorDifference(color1, color2) { |
| 307 | // pre-formatting and running through specific deltaE formula |
| 308 | let c1 = chroma(color1).lab(); |
| 309 | let c2 = chroma(color2).lab(); |
| 310 | let c1Lab = {L: c1[0], A: c1[1], B: c1[2]}; |
| 311 | let c2Lab = {L: c2[0], A: c2[1], B: c2[2]}; |
| 312 | // Use DeltaE 2000 formula (latest) |
| 313 | return DeltaE.getDeltaE00(c1Lab, c2Lab); |
| 314 | } |
| 315 | |
| 316 | function groupCommonHues(colors) { |
| 317 | // colors are in put as an array of Chroma.js colors. |
no outgoing calls
no test coverage detected