{"version":3,"file":"index.cjs","sources":["../../../../../../../../../../.yarn/berry/cache/chroma-js-npm-3.2.0-d5c39f5077-10c0.zip/node_modules/chroma-js/src/io/css/index.js"],"sourcesContent":["import chroma from '../../chroma.js';\nimport Color from '../../Color.js';\nimport input from '../input.js';\nimport { type } from '../../utils/index.js';\n\nimport rgb2css from './rgb2css.js';\nimport css2rgb from './css2rgb.js';\n\nColor.prototype.css = function (mode) {\n    return rgb2css(this._rgb, mode);\n};\n\nconst css = (...args) => new Color(...args, 'css');\nchroma.css = css;\n\ninput.format.css = css2rgb;\n\ninput.autodetect.push({\n    p: 5,\n    test: (h, ...rest) => {\n        if (!rest.length && type(h) === 'string' && css2rgb.test(h)) {\n            return 'css';\n        }\n    }\n});\n\nexport { css };\n"],"names":[],"mappings":";;;;;;;;AAQA,MAAM,UAAU,MAAM,SAAU,MAAM;AAClC,SAAO,QAAQ,KAAK,MAAM,IAAI;AAClC;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,CAAC,MAAM,SAAS;AAClB,QAAI,CAAC,KAAK,UAAU,KAAK,CAAC,MAAM,YAAY,QAAQ,KAAK,CAAC,GAAG;AACzD,aAAO;AAAA,IACX;AAAA,EACJ;AACJ,CAAC;;","x_google_ignoreList":[0]}