{"version":3,"file":"lch2lab.cjs","sources":["../../../../../../../../../../.yarn/berry/cache/chroma-js-npm-3.2.0-d5c39f5077-10c0.zip/node_modules/chroma-js/src/io/lch/lch2lab.js"],"sourcesContent":["import { unpack, DEG2RAD } from '../../utils/index.js';\nconst { sin, cos } = Math;\n\nconst lch2lab = (...args) => {\n    /*\n    Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel.\n    These formulas were invented by David Dalrymple to obtain maximum contrast without going\n    out of gamut if the parameters are in the range 0-1.\n\n    A saturation multiplier was added by Gregor Aisch\n    */\n    let [l, c, h] = unpack(args, 'lch');\n    if (isNaN(h)) h = 0;\n    h = h * DEG2RAD;\n    return [l, cos(h) * c, sin(h) * c];\n};\n\nexport default lch2lab;\n"],"names":["DEG2RAD"],"mappings":";;;AACA,MAAM,EAAE,KAAK,IAAG,IAAK;AAEhB,MAAC,UAAU,IAAI,SAAS;AAQzB,MAAI,CAAC,GAAG,GAAG,CAAC,IAAI,OAAO,MAAM,KAAK;AAClC,MAAI,MAAM,CAAC,EAAG,KAAI;AAClB,MAAI,IAAIA,MAAAA;AACR,SAAO,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACrC;;","x_google_ignoreList":[0]}