UNPKG

replace-color-ts

Version:

Replace color with another one pixel by pixel.

11 lines (10 loc) 478 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const delta_e_1 = __importDefault(require("delta-e")); const getDelta = (LAB1, LAB2, formula) => { return delta_e_1.default[`getDelta${formula}`]({ L: LAB1[0], A: LAB1[1], B: LAB1[2] }, { L: LAB2[0], A: LAB2[1], B: LAB2[2] }); }; exports.default = getDelta;