UNPKG

@macrostrat/column-components

Version:

React rendering primitives for stratigraphic columns

1 lines 1.34 kB
{"version":3,"file":"index.cjs","sources":["../../../../../../../../../../.yarn/berry/cache/chroma-js-npm-3.2.0-d5c39f5077-10c0.zip/node_modules/chroma-js/src/io/hex/index.js"],"sourcesContent":["import Color from '../../Color.js';\nimport chroma from '../../chroma.js';\nimport { type } from '../../utils/index.js';\nimport input from '../input.js';\nimport hex2rgb from './hex2rgb.js';\nimport rgb2hex from './rgb2hex.js';\n\nColor.prototype.hex = function (mode) {\n return rgb2hex(this._rgb, mode);\n};\n\nconst hex = (...args) => new Color(...args, 'hex');\nchroma.hex = hex;\n\ninput.format.hex = hex2rgb;\ninput.autodetect.push({\n p: 4,\n test: (h, ...rest) => {\n if (\n !rest.length &&\n type(h) === 'string' &&\n [3, 4, 5, 6, 7, 8, 9].indexOf(h.length) >= 0\n ) {\n return 'hex';\n }\n }\n});\n\nexport { hex };\n"],"names":[],"mappings":";;;;;;;;AAOA,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;AACnB,MAAM,WAAW,KAAK;AAAA,EAClB,GAAG;AAAA,EACH,MAAM,CAAC,MAAM,SAAS;AAClB,QACI,CAAC,KAAK,UACN,KAAK,CAAC,MAAM,YACZ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,GAC7C;AACE,aAAO;AAAA,IACX;AAAA,EACJ;AACJ,CAAC;;","x_google_ignoreList":[0]}