{"version":3,"file":"index.cjs","sources":["../../../../../../../../../../.yarn/berry/cache/chroma-js-npm-3.2.0-d5c39f5077-10c0.zip/node_modules/chroma-js/src/io/hcg/index.js"],"sourcesContent":["import { unpack, type } from '../../utils/index.js';\nimport chroma from '../../chroma.js';\nimport Color from '../../Color.js';\nimport input from '../input.js';\nimport hcg2rgb from './hcg2rgb.js';\nimport rgb2hcg from './rgb2hcg.js';\n\nColor.prototype.hcg = function () {\n    return rgb2hcg(this._rgb);\n};\n\nconst hcg = (...args) => new Color(...args, 'hcg');\nchroma.hcg = hcg;\n\ninput.format.hcg = hcg2rgb;\n\ninput.autodetect.push({\n    p: 1,\n    test: (...args) => {\n        args = unpack(args, 'hcg');\n        if (type(args) === 'array' && args.length === 3) {\n            return 'hcg';\n        }\n    }\n});\n\nexport { hcg };\n"],"names":[],"mappings":";;;;;;;;;AAOA,MAAM,UAAU,MAAM,WAAY;AAC9B,SAAO,QAAQ,KAAK,IAAI;AAC5B;AAEK,MAAC,MAAM,IAAI,SAAS,IAAI,MAAM,GAAG,MAAM,KAAK;AACjD,OAAO,MAAM;AAEb,MAAM,OAAO,MAAM;AAEnB,MAAM,WAAW,KAAK;AAAA,EAClB,GAAG;AAAA,EACH,MAAM,IAAI,SAAS;AACf,WAAO,OAAO,MAAM,KAAK;AACzB,QAAI,KAAK,IAAI,MAAM,WAAW,KAAK,WAAW,GAAG;AAC7C,aAAO;AAAA,IACX;AAAA,EACJ;AACJ,CAAC;;","x_google_ignoreList":[0]}