lib-colors
Version:
Simple node.js library for work with colors
10 lines (9 loc) • 390 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.labToString = labToString;
const alpha_is_set_helper_1 = require("../../helpers/alpha_is_set.helper");
function labToString(lab) {
const { l, a, b, alpha } = { ...lab };
const aValue = (0, alpha_is_set_helper_1.alphaIsSet)(alpha) ? ` / ${alpha}` : '';
return `lab(${l} ${a} ${b}${aValue})`;
}