{"version":3,"file":"is_dark-c10d892f.js","sources":["../../../node_modules/.pnpm/khroma@2.0.0/node_modules/khroma/dist/methods/luminance.js","../../../node_modules/.pnpm/khroma@2.0.0/node_modules/khroma/dist/methods/is_light.js","../../../node_modules/.pnpm/khroma@2.0.0/node_modules/khroma/dist/methods/is_dark.js"],"sourcesContent":["/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n","/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n","/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n"],"names":["luminance","isLight"],"mappings":";AAKA,MAAM,YAAY,CAAC,UAAU;AACzB,QAAM,EAAE,GAAG,GAAG,EAAG,IAAG,MAAM,MAAM,KAAK;AACrC,QAAMA,aAAY,SAAQ,EAAE,QAAQ,SAAS,CAAC,IAAI,SAAQ,EAAE,QAAQ,SAAS,CAAC,IAAI,SAAQ,EAAE,QAAQ,SAAS,CAAC;AAC9G,SAAO,EAAE,KAAK,MAAMA,UAAS;AACjC;AAEA,MAAA,cAAe;ACRf,MAAM,UAAU,CAAC,UAAU;AACvB,SAAOA,YAAU,KAAK,KAAK;AAC/B;AAEA,MAAA,YAAe;ACJf,MAAM,SAAS,CAAC,UAAU;AACtB,SAAO,CAACC,UAAQ,KAAK;AACzB;AAEA,MAAA,WAAe;"}