@oxyhq/bloom 0.35.8 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js +148 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.web.js +166 -0
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.web.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/index.js +13 -0
- package/lib/commonjs/frosted-icon-button/index.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/index.web.js +13 -0
- package/lib/commonjs/frosted-icon-button/index.web.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/shared.js +112 -0
- package/lib/commonjs/frosted-icon-button/shared.js.map +1 -0
- package/lib/commonjs/frosted-icon-button/types.js +6 -0
- package/lib/commonjs/frosted-icon-button/types.js.map +1 -0
- package/lib/commonjs/index.js +10 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +46 -37
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/theme/build-theme.js +31 -43
- package/lib/commonjs/theme/build-theme.js.map +1 -1
- package/lib/commonjs/theme/color-engine/cam16.js +161 -0
- package/lib/commonjs/theme/color-engine/cam16.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-role.js +183 -0
- package/lib/commonjs/theme/color-engine/color-role.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-roles.js +416 -0
- package/lib/commonjs/theme/color-engine/color-roles.js.map +1 -0
- package/lib/commonjs/theme/color-engine/color-utils.js +157 -0
- package/lib/commonjs/theme/color-engine/color-utils.js.map +1 -0
- package/lib/commonjs/theme/color-engine/contrast-curve.js +32 -0
- package/lib/commonjs/theme/color-engine/contrast-curve.js.map +1 -0
- package/lib/commonjs/theme/color-engine/contrast.js +70 -0
- package/lib/commonjs/theme/color-engine/contrast.js.map +1 -0
- package/lib/commonjs/theme/color-engine/dislike-analyzer.js +26 -0
- package/lib/commonjs/theme/color-engine/dislike-analyzer.js.map +1 -0
- package/lib/commonjs/theme/color-engine/dynamic-scheme.js +70 -0
- package/lib/commonjs/theme/color-engine/dynamic-scheme.js.map +1 -0
- package/lib/commonjs/theme/color-engine/hct-solver.js +236 -0
- package/lib/commonjs/theme/color-engine/hct-solver.js.map +1 -0
- package/lib/commonjs/theme/color-engine/hct.js +67 -0
- package/lib/commonjs/theme/color-engine/hct.js.map +1 -0
- package/lib/commonjs/theme/color-engine/index.js +173 -0
- package/lib/commonjs/theme/color-engine/index.js.map +1 -0
- package/lib/commonjs/theme/color-engine/lab-point-provider.js +32 -0
- package/lib/commonjs/theme/color-engine/lab-point-provider.js.map +1 -0
- package/lib/commonjs/theme/color-engine/math-utils.js +77 -0
- package/lib/commonjs/theme/color-engine/math-utils.js.map +1 -0
- package/lib/commonjs/theme/color-engine/quantizer-map.js +24 -0
- package/lib/commonjs/theme/color-engine/quantizer-map.js.map +1 -0
- package/lib/commonjs/theme/color-engine/quantizer-wu.js +266 -0
- package/lib/commonjs/theme/color-engine/quantizer-wu.js.map +1 -0
- package/lib/commonjs/theme/color-engine/scheme-variants.js +102 -0
- package/lib/commonjs/theme/color-engine/scheme-variants.js.map +1 -0
- package/lib/commonjs/theme/color-engine/score.js +80 -0
- package/lib/commonjs/theme/color-engine/score.js.map +1 -0
- package/lib/commonjs/theme/color-engine/seed-from-image.js +73 -0
- package/lib/commonjs/theme/color-engine/seed-from-image.js.map +1 -0
- package/lib/commonjs/theme/color-engine/tonal-palette.js +95 -0
- package/lib/commonjs/theme/color-engine/tonal-palette.js.map +1 -0
- package/lib/commonjs/theme/color-engine/tone-delta-pair.js +26 -0
- package/lib/commonjs/theme/color-engine/tone-delta-pair.js.map +1 -0
- package/lib/commonjs/theme/color-engine/variant.js +26 -0
- package/lib/commonjs/theme/color-engine/variant.js.map +1 -0
- package/lib/commonjs/theme/color-engine/viewing-conditions.js +61 -0
- package/lib/commonjs/theme/color-engine/viewing-conditions.js.map +1 -0
- package/lib/commonjs/theme/color-presets.js +44 -572
- package/lib/commonjs/theme/color-presets.js.map +1 -1
- package/lib/commonjs/theme/preset-vars.js +64 -47
- package/lib/commonjs/theme/preset-vars.js.map +1 -1
- package/lib/module/frosted-icon-button/FrostedIconButton.js +143 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.js.map +1 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.web.js +161 -0
- package/lib/module/frosted-icon-button/FrostedIconButton.web.js.map +1 -0
- package/lib/module/frosted-icon-button/index.js +4 -0
- package/lib/module/frosted-icon-button/index.js.map +1 -0
- package/lib/module/frosted-icon-button/index.web.js +11 -0
- package/lib/module/frosted-icon-button/index.web.js.map +1 -0
- package/lib/module/frosted-icon-button/shared.js +107 -0
- package/lib/module/frosted-icon-button/shared.js.map +1 -0
- package/lib/module/frosted-icon-button/types.js +4 -0
- package/lib/module/frosted-icon-button/types.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/theme/build-theme.js +32 -44
- package/lib/module/theme/build-theme.js.map +1 -1
- package/lib/module/theme/color-engine/cam16.js +155 -0
- package/lib/module/theme/color-engine/cam16.js.map +1 -0
- package/lib/module/theme/color-engine/color-role.js +177 -0
- package/lib/module/theme/color-engine/color-role.js.map +1 -0
- package/lib/module/theme/color-engine/color-roles.js +411 -0
- package/lib/module/theme/color-engine/color-roles.js.map +1 -0
- package/lib/module/theme/color-engine/color-utils.js +135 -0
- package/lib/module/theme/color-engine/color-utils.js.map +1 -0
- package/lib/module/theme/color-engine/contrast-curve.js +26 -0
- package/lib/module/theme/color-engine/contrast-curve.js.map +1 -0
- package/lib/module/theme/color-engine/contrast.js +61 -0
- package/lib/module/theme/color-engine/contrast.js.map +1 -0
- package/lib/module/theme/color-engine/dislike-analyzer.js +20 -0
- package/lib/module/theme/color-engine/dislike-analyzer.js.map +1 -0
- package/lib/module/theme/color-engine/dynamic-scheme.js +65 -0
- package/lib/module/theme/color-engine/dynamic-scheme.js.map +1 -0
- package/lib/module/theme/color-engine/hct-solver.js +231 -0
- package/lib/module/theme/color-engine/hct-solver.js.map +1 -0
- package/lib/module/theme/color-engine/hct.js +61 -0
- package/lib/module/theme/color-engine/hct.js.map +1 -0
- package/lib/module/theme/color-engine/index.js +57 -0
- package/lib/module/theme/color-engine/index.js.map +1 -0
- package/lib/module/theme/color-engine/lab-point-provider.js +25 -0
- package/lib/module/theme/color-engine/lab-point-provider.js.map +1 -0
- package/lib/module/theme/color-engine/math-utils.js +65 -0
- package/lib/module/theme/color-engine/math-utils.js.map +1 -0
- package/lib/module/theme/color-engine/quantizer-map.js +20 -0
- package/lib/module/theme/color-engine/quantizer-map.js.map +1 -0
- package/lib/module/theme/color-engine/quantizer-wu.js +261 -0
- package/lib/module/theme/color-engine/quantizer-wu.js.map +1 -0
- package/lib/module/theme/color-engine/scheme-variants.js +93 -0
- package/lib/module/theme/color-engine/scheme-variants.js.map +1 -0
- package/lib/module/theme/color-engine/score.js +75 -0
- package/lib/module/theme/color-engine/score.js.map +1 -0
- package/lib/module/theme/color-engine/seed-from-image.js +67 -0
- package/lib/module/theme/color-engine/seed-from-image.js.map +1 -0
- package/lib/module/theme/color-engine/tonal-palette.js +89 -0
- package/lib/module/theme/color-engine/tonal-palette.js.map +1 -0
- package/lib/module/theme/color-engine/tone-delta-pair.js +21 -0
- package/lib/module/theme/color-engine/tone-delta-pair.js.map +1 -0
- package/lib/module/theme/color-engine/variant.js +22 -0
- package/lib/module/theme/color-engine/variant.js.map +1 -0
- package/lib/module/theme/color-engine/viewing-conditions.js +55 -0
- package/lib/module/theme/color-engine/viewing-conditions.js.map +1 -0
- package/lib/module/theme/color-presets.js +44 -572
- package/lib/module/theme/color-presets.js.map +1 -1
- package/lib/module/theme/preset-vars.js +64 -46
- package/lib/module/theme/preset-vars.js.map +1 -1
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.d.ts +5 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.web.d.ts +5 -0
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.d.ts +3 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/frosted-icon-button/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts +60 -0
- package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts +69 -0
- package/lib/typescript/commonjs/frosted-icon-button/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-engine/cam16.d.ts +26 -0
- package/lib/typescript/commonjs/theme/color-engine/cam16.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-role.d.ts +36 -0
- package/lib/typescript/commonjs/theme/color-engine/color-role.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-roles.d.ts +58 -0
- package/lib/typescript/commonjs/theme/color-engine/color-roles.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/color-utils.d.ts +32 -0
- package/lib/typescript/commonjs/theme/color-engine/color-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast-curve.d.ts +9 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast-curve.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast.d.ts +12 -0
- package/lib/typescript/commonjs/theme/color-engine/contrast.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/dislike-analyzer.d.ts +11 -0
- package/lib/typescript/commonjs/theme/color-engine/dislike-analyzer.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/dynamic-scheme.d.ts +47 -0
- package/lib/typescript/commonjs/theme/color-engine/dynamic-scheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/hct-solver.d.ts +6 -0
- package/lib/typescript/commonjs/theme/color-engine/hct-solver.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/hct.d.ts +20 -0
- package/lib/typescript/commonjs/theme/color-engine/hct.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/index.d.ts +44 -0
- package/lib/typescript/commonjs/theme/color-engine/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/lab-point-provider.d.ts +6 -0
- package/lib/typescript/commonjs/theme/color-engine/lab-point-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/math-utils.d.ts +46 -0
- package/lib/typescript/commonjs/theme/color-engine/math-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-map.d.ts +3 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-map.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-wu.d.ts +3 -0
- package/lib/typescript/commonjs/theme/color-engine/quantizer-wu.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/scheme-variants.d.ts +23 -0
- package/lib/typescript/commonjs/theme/color-engine/scheme-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/score.d.ts +8 -0
- package/lib/typescript/commonjs/theme/color-engine/score.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/seed-from-image.d.ts +13 -0
- package/lib/typescript/commonjs/theme/color-engine/seed-from-image.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/tonal-palette.d.ts +24 -0
- package/lib/typescript/commonjs/theme/color-engine/tonal-palette.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/tone-delta-pair.d.ts +19 -0
- package/lib/typescript/commonjs/theme/color-engine/tone-delta-pair.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/variant.d.ts +19 -0
- package/lib/typescript/commonjs/theme/color-engine/variant.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-engine/viewing-conditions.d.ts +18 -0
- package/lib/typescript/commonjs/theme/color-engine/viewing-conditions.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/color-presets.d.ts +25 -20
- package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/preset-vars.d.ts +16 -12
- package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.d.ts +5 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.web.d.ts +5 -0
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.web.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/index.d.ts +3 -0
- package/lib/typescript/module/frosted-icon-button/index.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/index.web.d.ts +3 -0
- package/lib/typescript/module/frosted-icon-button/index.web.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/shared.d.ts +60 -0
- package/lib/typescript/module/frosted-icon-button/shared.d.ts.map +1 -0
- package/lib/typescript/module/frosted-icon-button/types.d.ts +69 -0
- package/lib/typescript/module/frosted-icon-button/types.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-engine/cam16.d.ts +26 -0
- package/lib/typescript/module/theme/color-engine/cam16.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-role.d.ts +36 -0
- package/lib/typescript/module/theme/color-engine/color-role.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-roles.d.ts +58 -0
- package/lib/typescript/module/theme/color-engine/color-roles.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/color-utils.d.ts +32 -0
- package/lib/typescript/module/theme/color-engine/color-utils.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/contrast-curve.d.ts +9 -0
- package/lib/typescript/module/theme/color-engine/contrast-curve.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/contrast.d.ts +12 -0
- package/lib/typescript/module/theme/color-engine/contrast.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/dislike-analyzer.d.ts +11 -0
- package/lib/typescript/module/theme/color-engine/dislike-analyzer.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/dynamic-scheme.d.ts +47 -0
- package/lib/typescript/module/theme/color-engine/dynamic-scheme.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/hct-solver.d.ts +6 -0
- package/lib/typescript/module/theme/color-engine/hct-solver.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/hct.d.ts +20 -0
- package/lib/typescript/module/theme/color-engine/hct.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/index.d.ts +44 -0
- package/lib/typescript/module/theme/color-engine/index.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/lab-point-provider.d.ts +6 -0
- package/lib/typescript/module/theme/color-engine/lab-point-provider.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/math-utils.d.ts +46 -0
- package/lib/typescript/module/theme/color-engine/math-utils.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/quantizer-map.d.ts +3 -0
- package/lib/typescript/module/theme/color-engine/quantizer-map.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/quantizer-wu.d.ts +3 -0
- package/lib/typescript/module/theme/color-engine/quantizer-wu.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/scheme-variants.d.ts +23 -0
- package/lib/typescript/module/theme/color-engine/scheme-variants.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/score.d.ts +8 -0
- package/lib/typescript/module/theme/color-engine/score.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/seed-from-image.d.ts +13 -0
- package/lib/typescript/module/theme/color-engine/seed-from-image.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/tonal-palette.d.ts +24 -0
- package/lib/typescript/module/theme/color-engine/tonal-palette.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/tone-delta-pair.d.ts +19 -0
- package/lib/typescript/module/theme/color-engine/tone-delta-pair.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/variant.d.ts +19 -0
- package/lib/typescript/module/theme/color-engine/variant.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-engine/viewing-conditions.d.ts +18 -0
- package/lib/typescript/module/theme/color-engine/viewing-conditions.d.ts.map +1 -0
- package/lib/typescript/module/theme/color-presets.d.ts +25 -20
- package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/module/theme/preset-vars.d.ts +16 -12
- package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
- package/package.json +17 -1
- package/src/__tests__/BloomThemeProvider.test.tsx +9 -4
- package/src/__tests__/FrostedIconButton.test.tsx +137 -0
- package/src/__tests__/FrostedIconButton.web.test.tsx +246 -0
- package/src/__tests__/native-root-vars.test.ts +8 -4
- package/src/__tests__/preset-vars.test.ts +66 -37
- package/src/__tests__/theme.test.ts +20 -12
- package/src/frosted-icon-button/FrostedIconButton.stories.tsx +65 -0
- package/src/frosted-icon-button/FrostedIconButton.tsx +156 -0
- package/src/frosted-icon-button/FrostedIconButton.web.tsx +207 -0
- package/src/frosted-icon-button/index.ts +2 -0
- package/src/frosted-icon-button/index.web.ts +9 -0
- package/src/frosted-icon-button/shared.ts +118 -0
- package/src/frosted-icon-button/types.ts +81 -0
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +509 -509
- package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +613 -613
- package/src/theme/__tests__/color-engine-golden.test.ts +81 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
- package/src/theme/__tests__/golden-tokens.test.ts +6 -7
- package/src/theme/__tests__/runtime-contract.test.ts +8 -8
- package/src/theme/__tests__/theme-colors-parity.test.ts +44 -88
- package/src/theme/build-theme.ts +32 -44
- package/src/theme/color-engine/cam16.ts +179 -0
- package/src/theme/color-engine/color-role.ts +217 -0
- package/src/theme/color-engine/color-roles.ts +435 -0
- package/src/theme/color-engine/color-utils.ts +157 -0
- package/src/theme/color-engine/contrast-curve.ts +25 -0
- package/src/theme/color-engine/contrast.ts +59 -0
- package/src/theme/color-engine/dislike-analyzer.ts +19 -0
- package/src/theme/color-engine/dynamic-scheme.ts +90 -0
- package/src/theme/color-engine/hct-solver.ts +263 -0
- package/src/theme/color-engine/hct.ts +69 -0
- package/src/theme/color-engine/index.ts +73 -0
- package/src/theme/color-engine/lab-point-provider.ts +26 -0
- package/src/theme/color-engine/math-utils.ts +69 -0
- package/src/theme/color-engine/quantizer-map.ts +17 -0
- package/src/theme/color-engine/quantizer-wu.ts +320 -0
- package/src/theme/color-engine/scheme-variants.ts +113 -0
- package/src/theme/color-engine/score.ts +82 -0
- package/src/theme/color-engine/seed-from-image.ts +64 -0
- package/src/theme/color-engine/tonal-palette.ts +94 -0
- package/src/theme/color-engine/tone-delta-pair.ts +21 -0
- package/src/theme/color-engine/variant.ts +18 -0
- package/src/theme/color-engine/viewing-conditions.ts +77 -0
- package/src/theme/color-presets.ts +54 -631
- package/src/theme/preset-vars.ts +65 -49
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.quantizeWu = quantizeWu;
|
|
7
|
+
var _colorUtils = require("./color-utils.js");
|
|
8
|
+
var _quantizerMap = require("./quantizer-map.js");
|
|
9
|
+
/**
|
|
10
|
+
* Bloom colour engine — Wu colour quantizer.
|
|
11
|
+
*
|
|
12
|
+
* Faithful port of Material Color Utilities' `QuantizerWu` (Apache-2.0). Builds a
|
|
13
|
+
* 3-D histogram of the image in a 32³ RGB grid, computes cumulative moments, then
|
|
14
|
+
* greedily splits the colour cube along the axis of greatest variance until it
|
|
15
|
+
* has `maxColors` boxes — each box's mean colour is a representative. Fully
|
|
16
|
+
* DETERMINISTIC (no k-means/randomness), which is why Bloom uses it directly.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const INDEX_BITS = 5;
|
|
20
|
+
const SIDE_LENGTH = 33; // (1 << INDEX_BITS) + 1
|
|
21
|
+
const TOTAL_SIZE = 35937; // SIDE_LENGTH³
|
|
22
|
+
|
|
23
|
+
const makeBox = () => ({
|
|
24
|
+
r0: 0,
|
|
25
|
+
r1: 0,
|
|
26
|
+
g0: 0,
|
|
27
|
+
g1: 0,
|
|
28
|
+
b0: 0,
|
|
29
|
+
b1: 0,
|
|
30
|
+
vol: 0
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Read a moment/weight cell. Every index here is produced by `getIndex` (or a
|
|
35
|
+
* bounded loop) and is always in range for the fixed-size grids, but under
|
|
36
|
+
* `noUncheckedIndexedAccess` the element type is `number | undefined`; this
|
|
37
|
+
* asserts the in-range invariant honestly instead of masking it.
|
|
38
|
+
*/
|
|
39
|
+
function cell(grid, index) {
|
|
40
|
+
const value = grid[index];
|
|
41
|
+
if (value === undefined) throw new RangeError(`quantizer grid index ${index} out of range`);
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Read a colour box by index (the box array is fully pre-populated). */
|
|
46
|
+
function boxAt(cubes, index) {
|
|
47
|
+
const box = cubes[index];
|
|
48
|
+
if (box === undefined) throw new RangeError(`quantizer box index ${index} out of range`);
|
|
49
|
+
return box;
|
|
50
|
+
}
|
|
51
|
+
function getIndex(r, g, b) {
|
|
52
|
+
return (r << INDEX_BITS * 2) + (r << INDEX_BITS + 1) + r + (g << INDEX_BITS) + g + b;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Wu-quantize `pixels` into at most `maxColors` representative ARGB colours. */
|
|
56
|
+
function quantizeWu(pixels, maxColors) {
|
|
57
|
+
const weights = new Array(TOTAL_SIZE).fill(0);
|
|
58
|
+
const momentsR = new Array(TOTAL_SIZE).fill(0);
|
|
59
|
+
const momentsG = new Array(TOTAL_SIZE).fill(0);
|
|
60
|
+
const momentsB = new Array(TOTAL_SIZE).fill(0);
|
|
61
|
+
const moments = new Array(TOTAL_SIZE).fill(0);
|
|
62
|
+
|
|
63
|
+
// Histogram.
|
|
64
|
+
const counts = (0, _quantizerMap.countByColor)(pixels);
|
|
65
|
+
const bitsToRemove = 8 - INDEX_BITS;
|
|
66
|
+
for (const [pixel, count] of counts.entries()) {
|
|
67
|
+
const red = (0, _colorUtils.redFromArgb)(pixel);
|
|
68
|
+
const green = (0, _colorUtils.greenFromArgb)(pixel);
|
|
69
|
+
const blue = (0, _colorUtils.blueFromArgb)(pixel);
|
|
70
|
+
const index = getIndex((red >> bitsToRemove) + 1, (green >> bitsToRemove) + 1, (blue >> bitsToRemove) + 1);
|
|
71
|
+
weights[index] = cell(weights, index) + count;
|
|
72
|
+
momentsR[index] = cell(momentsR, index) + count * red;
|
|
73
|
+
momentsG[index] = cell(momentsG, index) + count * green;
|
|
74
|
+
momentsB[index] = cell(momentsB, index) + count * blue;
|
|
75
|
+
moments[index] = cell(moments, index) + count * (red * red + green * green + blue * blue);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Cumulative moments.
|
|
79
|
+
for (let r = 1; r < SIDE_LENGTH; r++) {
|
|
80
|
+
const area = new Array(SIDE_LENGTH).fill(0);
|
|
81
|
+
const areaR = new Array(SIDE_LENGTH).fill(0);
|
|
82
|
+
const areaG = new Array(SIDE_LENGTH).fill(0);
|
|
83
|
+
const areaB = new Array(SIDE_LENGTH).fill(0);
|
|
84
|
+
const area2 = new Array(SIDE_LENGTH).fill(0.0);
|
|
85
|
+
for (let g = 1; g < SIDE_LENGTH; g++) {
|
|
86
|
+
let line = 0;
|
|
87
|
+
let lineR = 0;
|
|
88
|
+
let lineG = 0;
|
|
89
|
+
let lineB = 0;
|
|
90
|
+
let line2 = 0.0;
|
|
91
|
+
for (let b = 1; b < SIDE_LENGTH; b++) {
|
|
92
|
+
const index = getIndex(r, g, b);
|
|
93
|
+
line += cell(weights, index);
|
|
94
|
+
lineR += cell(momentsR, index);
|
|
95
|
+
lineG += cell(momentsG, index);
|
|
96
|
+
lineB += cell(momentsB, index);
|
|
97
|
+
line2 += cell(moments, index);
|
|
98
|
+
area[b] = cell(area, b) + line;
|
|
99
|
+
areaR[b] = cell(areaR, b) + lineR;
|
|
100
|
+
areaG[b] = cell(areaG, b) + lineG;
|
|
101
|
+
areaB[b] = cell(areaB, b) + lineB;
|
|
102
|
+
area2[b] = cell(area2, b) + line2;
|
|
103
|
+
const prev = getIndex(r - 1, g, b);
|
|
104
|
+
weights[index] = cell(weights, prev) + cell(area, b);
|
|
105
|
+
momentsR[index] = cell(momentsR, prev) + cell(areaR, b);
|
|
106
|
+
momentsG[index] = cell(momentsG, prev) + cell(areaG, b);
|
|
107
|
+
momentsB[index] = cell(momentsB, prev) + cell(areaB, b);
|
|
108
|
+
moments[index] = cell(moments, prev) + cell(area2, b);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const volume = (cube, moment) => cell(moment, getIndex(cube.r1, cube.g1, cube.b1)) - cell(moment, getIndex(cube.r1, cube.g1, cube.b0)) - cell(moment, getIndex(cube.r1, cube.g0, cube.b1)) + cell(moment, getIndex(cube.r1, cube.g0, cube.b0)) - cell(moment, getIndex(cube.r0, cube.g1, cube.b1)) + cell(moment, getIndex(cube.r0, cube.g1, cube.b0)) + cell(moment, getIndex(cube.r0, cube.g0, cube.b1)) - cell(moment, getIndex(cube.r0, cube.g0, cube.b0));
|
|
113
|
+
const bottom = (cube, direction, moment) => {
|
|
114
|
+
switch (direction) {
|
|
115
|
+
case 'red':
|
|
116
|
+
return -cell(moment, getIndex(cube.r0, cube.g1, cube.b1)) + cell(moment, getIndex(cube.r0, cube.g1, cube.b0)) + cell(moment, getIndex(cube.r0, cube.g0, cube.b1)) - cell(moment, getIndex(cube.r0, cube.g0, cube.b0));
|
|
117
|
+
case 'green':
|
|
118
|
+
return -cell(moment, getIndex(cube.r1, cube.g0, cube.b1)) + cell(moment, getIndex(cube.r1, cube.g0, cube.b0)) + cell(moment, getIndex(cube.r0, cube.g0, cube.b1)) - cell(moment, getIndex(cube.r0, cube.g0, cube.b0));
|
|
119
|
+
case 'blue':
|
|
120
|
+
return -cell(moment, getIndex(cube.r1, cube.g1, cube.b0)) + cell(moment, getIndex(cube.r1, cube.g0, cube.b0)) + cell(moment, getIndex(cube.r0, cube.g1, cube.b0)) - cell(moment, getIndex(cube.r0, cube.g0, cube.b0));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const top = (cube, direction, position, moment) => {
|
|
124
|
+
switch (direction) {
|
|
125
|
+
case 'red':
|
|
126
|
+
return cell(moment, getIndex(position, cube.g1, cube.b1)) - cell(moment, getIndex(position, cube.g1, cube.b0)) - cell(moment, getIndex(position, cube.g0, cube.b1)) + cell(moment, getIndex(position, cube.g0, cube.b0));
|
|
127
|
+
case 'green':
|
|
128
|
+
return cell(moment, getIndex(cube.r1, position, cube.b1)) - cell(moment, getIndex(cube.r1, position, cube.b0)) - cell(moment, getIndex(cube.r0, position, cube.b1)) + cell(moment, getIndex(cube.r0, position, cube.b0));
|
|
129
|
+
case 'blue':
|
|
130
|
+
return cell(moment, getIndex(cube.r1, cube.g1, position)) - cell(moment, getIndex(cube.r1, cube.g0, position)) - cell(moment, getIndex(cube.r0, cube.g1, position)) + cell(moment, getIndex(cube.r0, cube.g0, position));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const variance = cube => {
|
|
134
|
+
const dr = volume(cube, momentsR);
|
|
135
|
+
const dg = volume(cube, momentsG);
|
|
136
|
+
const db = volume(cube, momentsB);
|
|
137
|
+
const xx = cell(moments, getIndex(cube.r1, cube.g1, cube.b1)) - cell(moments, getIndex(cube.r1, cube.g1, cube.b0)) - cell(moments, getIndex(cube.r1, cube.g0, cube.b1)) + cell(moments, getIndex(cube.r1, cube.g0, cube.b0)) - cell(moments, getIndex(cube.r0, cube.g1, cube.b1)) + cell(moments, getIndex(cube.r0, cube.g1, cube.b0)) + cell(moments, getIndex(cube.r0, cube.g0, cube.b1)) - cell(moments, getIndex(cube.r0, cube.g0, cube.b0));
|
|
138
|
+
const hypotenuse = dr * dr + dg * dg + db * db;
|
|
139
|
+
return xx - hypotenuse / volume(cube, weights);
|
|
140
|
+
};
|
|
141
|
+
const maximize = (cube, direction, first, last, wholeR, wholeG, wholeB, wholeW) => {
|
|
142
|
+
const bottomR = bottom(cube, direction, momentsR);
|
|
143
|
+
const bottomG = bottom(cube, direction, momentsG);
|
|
144
|
+
const bottomB = bottom(cube, direction, momentsB);
|
|
145
|
+
const bottomW = bottom(cube, direction, weights);
|
|
146
|
+
let max = 0.0;
|
|
147
|
+
let cut = -1;
|
|
148
|
+
for (let i = first; i < last; i++) {
|
|
149
|
+
let halfR = bottomR + top(cube, direction, i, momentsR);
|
|
150
|
+
let halfG = bottomG + top(cube, direction, i, momentsG);
|
|
151
|
+
let halfB = bottomB + top(cube, direction, i, momentsB);
|
|
152
|
+
let halfW = bottomW + top(cube, direction, i, weights);
|
|
153
|
+
if (halfW === 0) continue;
|
|
154
|
+
let temp = (halfR * halfR + halfG * halfG + halfB * halfB) / halfW;
|
|
155
|
+
halfR = wholeR - halfR;
|
|
156
|
+
halfG = wholeG - halfG;
|
|
157
|
+
halfB = wholeB - halfB;
|
|
158
|
+
halfW = wholeW - halfW;
|
|
159
|
+
if (halfW === 0) continue;
|
|
160
|
+
temp += (halfR * halfR + halfG * halfG + halfB * halfB) / halfW;
|
|
161
|
+
if (temp > max) {
|
|
162
|
+
max = temp;
|
|
163
|
+
cut = i;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
cutLocation: cut,
|
|
168
|
+
maximum: max
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
const cut = (one, two) => {
|
|
172
|
+
const wholeR = volume(one, momentsR);
|
|
173
|
+
const wholeG = volume(one, momentsG);
|
|
174
|
+
const wholeB = volume(one, momentsB);
|
|
175
|
+
const wholeW = volume(one, weights);
|
|
176
|
+
const maxR = maximize(one, 'red', one.r0 + 1, one.r1, wholeR, wholeG, wholeB, wholeW);
|
|
177
|
+
const maxG = maximize(one, 'green', one.g0 + 1, one.g1, wholeR, wholeG, wholeB, wholeW);
|
|
178
|
+
const maxB = maximize(one, 'blue', one.b0 + 1, one.b1, wholeR, wholeG, wholeB, wholeW);
|
|
179
|
+
let direction;
|
|
180
|
+
if (maxR.maximum >= maxG.maximum && maxR.maximum >= maxB.maximum) {
|
|
181
|
+
if (maxR.cutLocation < 0) return false;
|
|
182
|
+
direction = 'red';
|
|
183
|
+
} else if (maxG.maximum >= maxR.maximum && maxG.maximum >= maxB.maximum) {
|
|
184
|
+
direction = 'green';
|
|
185
|
+
} else {
|
|
186
|
+
direction = 'blue';
|
|
187
|
+
}
|
|
188
|
+
two.r1 = one.r1;
|
|
189
|
+
two.g1 = one.g1;
|
|
190
|
+
two.b1 = one.b1;
|
|
191
|
+
switch (direction) {
|
|
192
|
+
case 'red':
|
|
193
|
+
one.r1 = maxR.cutLocation;
|
|
194
|
+
two.r0 = one.r1;
|
|
195
|
+
two.g0 = one.g0;
|
|
196
|
+
two.b0 = one.b0;
|
|
197
|
+
break;
|
|
198
|
+
case 'green':
|
|
199
|
+
one.g1 = maxG.cutLocation;
|
|
200
|
+
two.r0 = one.r0;
|
|
201
|
+
two.g0 = one.g1;
|
|
202
|
+
two.b0 = one.b0;
|
|
203
|
+
break;
|
|
204
|
+
case 'blue':
|
|
205
|
+
one.b1 = maxB.cutLocation;
|
|
206
|
+
two.r0 = one.r0;
|
|
207
|
+
two.g0 = one.g0;
|
|
208
|
+
two.b0 = one.b1;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
one.vol = (one.r1 - one.r0) * (one.g1 - one.g0) * (one.b1 - one.b0);
|
|
212
|
+
two.vol = (two.r1 - two.r0) * (two.g1 - two.g0) * (two.b1 - two.b0);
|
|
213
|
+
return true;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// Greedily split the colour cube.
|
|
217
|
+
const cubes = Array.from({
|
|
218
|
+
length: maxColors
|
|
219
|
+
}, makeBox);
|
|
220
|
+
const volumeVariance = new Array(maxColors).fill(0.0);
|
|
221
|
+
const firstCube = boxAt(cubes, 0);
|
|
222
|
+
firstCube.r0 = 0;
|
|
223
|
+
firstCube.g0 = 0;
|
|
224
|
+
firstCube.b0 = 0;
|
|
225
|
+
firstCube.r1 = SIDE_LENGTH - 1;
|
|
226
|
+
firstCube.g1 = SIDE_LENGTH - 1;
|
|
227
|
+
firstCube.b1 = SIDE_LENGTH - 1;
|
|
228
|
+
let generatedColorCount = maxColors;
|
|
229
|
+
let next = 0;
|
|
230
|
+
for (let i = 1; i < maxColors; i++) {
|
|
231
|
+
if (cut(boxAt(cubes, next), boxAt(cubes, i))) {
|
|
232
|
+
volumeVariance[next] = boxAt(cubes, next).vol > 1 ? variance(boxAt(cubes, next)) : 0.0;
|
|
233
|
+
volumeVariance[i] = boxAt(cubes, i).vol > 1 ? variance(boxAt(cubes, i)) : 0.0;
|
|
234
|
+
} else {
|
|
235
|
+
volumeVariance[next] = 0.0;
|
|
236
|
+
i--;
|
|
237
|
+
}
|
|
238
|
+
next = 0;
|
|
239
|
+
let temp = cell(volumeVariance, 0);
|
|
240
|
+
for (let j = 1; j <= i; j++) {
|
|
241
|
+
if (cell(volumeVariance, j) > temp) {
|
|
242
|
+
temp = cell(volumeVariance, j);
|
|
243
|
+
next = j;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (temp <= 0.0) {
|
|
247
|
+
generatedColorCount = i + 1;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Mean colour of each box.
|
|
253
|
+
const colors = [];
|
|
254
|
+
for (let i = 0; i < generatedColorCount; i++) {
|
|
255
|
+
const cube = boxAt(cubes, i);
|
|
256
|
+
const weight = volume(cube, weights);
|
|
257
|
+
if (weight > 0) {
|
|
258
|
+
const r = Math.round(volume(cube, momentsR) / weight);
|
|
259
|
+
const g = Math.round(volume(cube, momentsG) / weight);
|
|
260
|
+
const b = Math.round(volume(cube, momentsB) / weight);
|
|
261
|
+
colors.push((255 << 24 | (r & 0x0ff) << 16 | (g & 0x0ff) << 8 | b & 0x0ff) >>> 0);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return colors;
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=quantizer-wu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_colorUtils","require","_quantizerMap","INDEX_BITS","SIDE_LENGTH","TOTAL_SIZE","makeBox","r0","r1","g0","g1","b0","b1","vol","cell","grid","index","value","undefined","RangeError","boxAt","cubes","box","getIndex","r","g","b","quantizeWu","pixels","maxColors","weights","Array","fill","momentsR","momentsG","momentsB","moments","counts","countByColor","bitsToRemove","pixel","count","entries","red","redFromArgb","green","greenFromArgb","blue","blueFromArgb","area","areaR","areaG","areaB","area2","line","lineR","lineG","lineB","line2","prev","volume","cube","moment","bottom","direction","top","position","variance","dr","dg","db","xx","hypotenuse","maximize","first","last","wholeR","wholeG","wholeB","wholeW","bottomR","bottomG","bottomB","bottomW","max","cut","i","halfR","halfG","halfB","halfW","temp","cutLocation","maximum","one","two","maxR","maxG","maxB","from","length","volumeVariance","firstCube","generatedColorCount","next","j","colors","weight","Math","round","push"],"sourceRoot":"../../../../src","sources":["theme/color-engine/quantizer-wu.ts"],"mappings":";;;;;;AASA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAME,UAAU,GAAG,CAAC;AACpB,MAAMC,WAAW,GAAG,EAAE,CAAC,CAAC;AACxB,MAAMC,UAAU,GAAG,KAAK,CAAC,CAAC;;AAc1B,MAAMC,OAAO,GAAGA,CAAA,MAAY;EAAEC,EAAE,EAAE,CAAC;EAAEC,EAAE,EAAE,CAAC;EAAEC,EAAE,EAAE,CAAC;EAAEC,EAAE,EAAE,CAAC;EAAEC,EAAE,EAAE,CAAC;EAAEC,EAAE,EAAE,CAAC;EAAEC,GAAG,EAAE;AAAE,CAAC,CAAC;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,IAAIA,CAACC,IAAc,EAAEC,KAAa,EAAU;EACnD,MAAMC,KAAK,GAAGF,IAAI,CAACC,KAAK,CAAC;EACzB,IAAIC,KAAK,KAAKC,SAAS,EAAE,MAAM,IAAIC,UAAU,CAAC,wBAAwBH,KAAK,eAAe,CAAC;EAC3F,OAAOC,KAAK;AACd;;AAEA;AACA,SAASG,KAAKA,CAACC,KAAY,EAAEL,KAAa,EAAO;EAC/C,MAAMM,GAAG,GAAGD,KAAK,CAACL,KAAK,CAAC;EACxB,IAAIM,GAAG,KAAKJ,SAAS,EAAE,MAAM,IAAIC,UAAU,CAAC,uBAAuBH,KAAK,eAAe,CAAC;EACxF,OAAOM,GAAG;AACZ;AAEA,SAASC,QAAQA,CAACC,CAAS,EAAEC,C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MAAM,CAAC;MACrD,MAAMjF,CAAC,GAAGkF,IAAI,CAACC,KAAK,CAACjD,MAAM,CAACC,IAAI,EAAE1B,QAAQ,CAAC,GAAGwE,MAAM,CAAC;MACrDD,MAAM,CAACI,IAAI,CAAC,CAAE,GAAG,IAAI,EAAE,GAAK,CAACtF,CAAC,GAAG,KAAK,KAAK,EAAG,GAAI,CAACC,CAAC,GAAG,KAAK,KAAK,CAAE,GAAIC,CAAC,GAAG,KAAM,MAAM,CAAC,CAAC;IAC3F;EACF;EACA,OAAOgF,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.buildScheme = buildScheme;
|
|
7
|
+
exports.schemeExpressive = schemeExpressive;
|
|
8
|
+
exports.schemeNeutral = schemeNeutral;
|
|
9
|
+
exports.schemeTonalSpot = schemeTonalSpot;
|
|
10
|
+
exports.schemeVibrant = schemeVibrant;
|
|
11
|
+
var _dynamicScheme = require("./dynamic-scheme.js");
|
|
12
|
+
var _mathUtils = require("./math-utils.js");
|
|
13
|
+
var _tonalPalette = require("./tonal-palette.js");
|
|
14
|
+
var _variant = require("./variant.js");
|
|
15
|
+
/**
|
|
16
|
+
* Bloom colour engine — scheme variants.
|
|
17
|
+
*
|
|
18
|
+
* How each variant derives its five tonal palettes from the seed HCT. Faithful
|
|
19
|
+
* port of Material Color Utilities' `Scheme*` families (Apache-2.0), expressed
|
|
20
|
+
* as plain builder functions (our style) rather than subclasses. Fidelity/
|
|
21
|
+
* Content are intentionally left out — they need the temperature-cache complement
|
|
22
|
+
* and aren't useful for Bloom's fixed brand seeds.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const VIBRANT_HUES = [0.0, 41.0, 61.0, 101.0, 131.0, 181.0, 251.0, 301.0, 360.0];
|
|
26
|
+
const VIBRANT_SECONDARY_ROTATIONS = [18.0, 15.0, 10.0, 12.0, 15.0, 18.0, 15.0, 12.0, 12.0];
|
|
27
|
+
const VIBRANT_TERTIARY_ROTATIONS = [35.0, 30.0, 20.0, 25.0, 30.0, 35.0, 30.0, 25.0, 25.0];
|
|
28
|
+
const EXPRESSIVE_HUES = [0.0, 21.0, 51.0, 121.0, 151.0, 191.0, 271.0, 321.0, 360.0];
|
|
29
|
+
const EXPRESSIVE_SECONDARY_ROTATIONS = [45.0, 95.0, 45.0, 20.0, 45.0, 90.0, 45.0, 45.0, 45.0];
|
|
30
|
+
const EXPRESSIVE_TERTIARY_ROTATIONS = [120.0, 120.0, 20.0, 45.0, 20.0, 15.0, 20.0, 120.0, 120.0];
|
|
31
|
+
|
|
32
|
+
/** Maxed-out colourfulness at each position of the primary palette. */
|
|
33
|
+
function schemeVibrant(source, isDark, contrastLevel) {
|
|
34
|
+
return new _dynamicScheme.DynamicScheme({
|
|
35
|
+
sourceColorArgb: source.toInt(),
|
|
36
|
+
variant: _variant.Variant.VIBRANT,
|
|
37
|
+
contrastLevel,
|
|
38
|
+
isDark,
|
|
39
|
+
primaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 200.0),
|
|
40
|
+
secondaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(_dynamicScheme.DynamicScheme.getRotatedHue(source, VIBRANT_HUES, VIBRANT_SECONDARY_ROTATIONS), 24.0),
|
|
41
|
+
tertiaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(_dynamicScheme.DynamicScheme.getRotatedHue(source, VIBRANT_HUES, VIBRANT_TERTIARY_ROTATIONS), 32.0),
|
|
42
|
+
neutralPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 10.0),
|
|
43
|
+
neutralVariantPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 12.0)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Playful, intentionally detached from the seed hue (primary rotated 240°). */
|
|
48
|
+
function schemeExpressive(source, isDark, contrastLevel) {
|
|
49
|
+
return new _dynamicScheme.DynamicScheme({
|
|
50
|
+
sourceColorArgb: source.toInt(),
|
|
51
|
+
variant: _variant.Variant.EXPRESSIVE,
|
|
52
|
+
contrastLevel,
|
|
53
|
+
isDark,
|
|
54
|
+
primaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma((0, _mathUtils.sanitizeDegreesDouble)(source.hue + 240.0), 40.0),
|
|
55
|
+
secondaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(_dynamicScheme.DynamicScheme.getRotatedHue(source, EXPRESSIVE_HUES, EXPRESSIVE_SECONDARY_ROTATIONS), 24.0),
|
|
56
|
+
tertiaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(_dynamicScheme.DynamicScheme.getRotatedHue(source, EXPRESSIVE_HUES, EXPRESSIVE_TERTIARY_ROTATIONS), 32.0),
|
|
57
|
+
neutralPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue + 15, 8.0),
|
|
58
|
+
neutralVariantPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue + 15, 12.0)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** The Material You default — a calm, balanced treatment of the seed. */
|
|
63
|
+
function schemeTonalSpot(source, isDark, contrastLevel) {
|
|
64
|
+
return new _dynamicScheme.DynamicScheme({
|
|
65
|
+
sourceColorArgb: source.toInt(),
|
|
66
|
+
variant: _variant.Variant.TONAL_SPOT,
|
|
67
|
+
contrastLevel,
|
|
68
|
+
isDark,
|
|
69
|
+
primaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 36.0),
|
|
70
|
+
secondaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 16.0),
|
|
71
|
+
tertiaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma((0, _mathUtils.sanitizeDegreesDouble)(source.hue + 60.0), 24.0),
|
|
72
|
+
neutralPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 6.0),
|
|
73
|
+
neutralVariantPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 8.0)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Near-greyscale — the seed hue is present only as a whisper. */
|
|
78
|
+
function schemeNeutral(source, isDark, contrastLevel) {
|
|
79
|
+
return new _dynamicScheme.DynamicScheme({
|
|
80
|
+
sourceColorArgb: source.toInt(),
|
|
81
|
+
variant: _variant.Variant.NEUTRAL,
|
|
82
|
+
contrastLevel,
|
|
83
|
+
isDark,
|
|
84
|
+
primaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 12.0),
|
|
85
|
+
secondaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 8.0),
|
|
86
|
+
tertiaryPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 16.0),
|
|
87
|
+
neutralPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 2.0),
|
|
88
|
+
neutralVariantPalette: _tonalPalette.TonalPalette.fromHueAndChroma(source.hue, 2.0)
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
const BUILDERS = {
|
|
92
|
+
vibrant: schemeVibrant,
|
|
93
|
+
expressive: schemeExpressive,
|
|
94
|
+
tonalSpot: schemeTonalSpot,
|
|
95
|
+
neutral: schemeNeutral
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** Build a scheme by variant name. */
|
|
99
|
+
function buildScheme(variant, source, isDark, contrastLevel = 0) {
|
|
100
|
+
return BUILDERS[variant](source, isDark, contrastLevel);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=scheme-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_dynamicScheme","require","_mathUtils","_tonalPalette","_variant","VIBRANT_HUES","VIBRANT_SECONDARY_ROTATIONS","VIBRANT_TERTIARY_ROTATIONS","EXPRESSIVE_HUES","EXPRESSIVE_SECONDARY_ROTATIONS","EXPRESSIVE_TERTIARY_ROTATIONS","schemeVibrant","source","isDark","contrastLevel","DynamicScheme","sourceColorArgb","toInt","variant","Variant","VIBRANT","primaryPalette","TonalPalette","fromHueAndChroma","hue","secondaryPalette","getRotatedHue","tertiaryPalette","neutralPalette","neutralVariantPalette","schemeExpressive","EXPRESSIVE","sanitizeDegreesDouble","schemeTonalSpot","TONAL_SPOT","schemeNeutral","NEUTRAL","BUILDERS","vibrant","expressive","tonalSpot","neutral","buildScheme"],"sourceRoot":"../../../../src","sources":["theme/color-engine/scheme-variants.ts"],"mappings":";;;;;;;;;;AASA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAMI,YAAY,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AAChF,MAAMC,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC1F,MAAMC,0BAA0B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAEzF,MAAMC,eAAe,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACnF,MAAMC,8BAA8B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAA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,GAAG,EAAE,GAAG;EACtE,CAAC,CAAC;AACJ;;AAEA;AACO,SAASW,aAAaA,CAACvB,MAAW,EAAEC,MAAe,EAAEC,aAAqB,EAAiB;EAChG,OAAO,IAAIC,4BAAa,CAAC;IACvBC,eAAe,EAAEJ,MAAM,CAACK,KAAK,CAAC,CAAC;IAC/BC,OAAO,EAAEC,gBAAO,CAACiB,OAAO;IACxBtB,aAAa;IACbD,MAAM;IACNQ,cAAc,EAAEC,0BAAY,CAACC,gBAAgB,CAACX,MAAM,CAACY,GAAG,EAAE,IAAI,CAAC;IAC/DC,gBAAgB,EAAEH,0BAAY,CAACC,gBAAgB,CAACX,MAAM,CAACY,GAAG,EAAE,GAAG,CAAC;IAChEG,eAAe,EAAEL,0BAAY,CAACC,gBAAgB,CAACX,MAAM,CAACY,GAAG,EAAE,IAAI,CAAC;IAChEI,cAAc,EAAEN,0BAAY,CAACC,gBAAgB,CAACX,MAAM,CAACY,GAAG,EAAE,GAAG,CAAC;IAC9DK,qBAAqB,EAAEP,0BAAY,CAACC,gBAAgB,CAACX,MAAM,CAACY,GAAG,EAAE,GAAG;EACtE,CAAC,CAAC;AACJ;AAEA,MAAMa,QAAiF,GAAG;EACxFC,OAAO,EAAE3B,aAAa;EACtB4B,UAAU,EAAET,gBAAgB;EAC5BU,SAAS,EAAEP,eAAe;EAC1BQ,OAAO,EAAEN;AACX,CAAC;;AAED;AACO,SAASO,WAAWA,CACzBxB,OAAsB,EACtBN,MAAW,EACXC,MAAe,EACfC,aAAa,GAAG,CAAC,EACF;EACf,OAAOuB,QAAQ,CAACnB,OAAO,CAAC,CAACN,MAAM,EAAEC,MAAM,EAAEC,aAAa,CAAC;AACzD","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.score = score;
|
|
7
|
+
var _hct = require("./hct.js");
|
|
8
|
+
var _mathUtils = require("./math-utils.js");
|
|
9
|
+
/**
|
|
10
|
+
* Bloom colour engine — seed scoring.
|
|
11
|
+
*
|
|
12
|
+
* Faithful port of Material Color Utilities' `Score` (Apache-2.0). Given a map
|
|
13
|
+
* of quantized colours → population, ranks them for theme suitability — favouring
|
|
14
|
+
* colours whose hue is well-represented in the image AND chromatic enough to make
|
|
15
|
+
* a good accent — and de-duplicates by hue. Returns the best seed candidates.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const TARGET_CHROMA = 48.0;
|
|
19
|
+
const WEIGHT_PROPORTION = 0.7;
|
|
20
|
+
const WEIGHT_CHROMA_ABOVE = 0.3;
|
|
21
|
+
const WEIGHT_CHROMA_BELOW = 0.1;
|
|
22
|
+
const CUTOFF_CHROMA = 5.0;
|
|
23
|
+
const CUTOFF_EXCITED_PROPORTION = 0.01;
|
|
24
|
+
/** Rank quantized colours as theme seeds. Best first. */
|
|
25
|
+
function score(colorsToPopulation, options = {}) {
|
|
26
|
+
const desired = options.desired ?? 4;
|
|
27
|
+
const fallbackColorARGB = options.fallbackColorARGB ?? 0xff4285f4;
|
|
28
|
+
const filter = options.filter ?? true;
|
|
29
|
+
const colorsHct = [];
|
|
30
|
+
const huePopulation = new Array(360).fill(0);
|
|
31
|
+
let populationSum = 0;
|
|
32
|
+
for (const [argb, population] of colorsToPopulation.entries()) {
|
|
33
|
+
const hct = _hct.Hct.fromInt(argb);
|
|
34
|
+
colorsHct.push(hct);
|
|
35
|
+
const hueIndex = Math.floor(hct.hue);
|
|
36
|
+
huePopulation[hueIndex] = (huePopulation[hueIndex] ?? 0) + population;
|
|
37
|
+
populationSum += population;
|
|
38
|
+
}
|
|
39
|
+
const hueExcitedProportions = new Array(360).fill(0.0);
|
|
40
|
+
for (let hue = 0; hue < 360; hue++) {
|
|
41
|
+
const proportion = (huePopulation[hue] ?? 0) / populationSum;
|
|
42
|
+
for (let i = hue - 14; i < hue + 16; i++) {
|
|
43
|
+
const index = (0, _mathUtils.sanitizeDegreesInt)(i);
|
|
44
|
+
hueExcitedProportions[index] = (hueExcitedProportions[index] ?? 0) + proportion;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const scoredHct = [];
|
|
48
|
+
for (const hct of colorsHct) {
|
|
49
|
+
const hue = (0, _mathUtils.sanitizeDegreesInt)(Math.round(hct.hue));
|
|
50
|
+
const proportion = hueExcitedProportions[hue] ?? 0;
|
|
51
|
+
if (filter && (hct.chroma < CUTOFF_CHROMA || proportion <= CUTOFF_EXCITED_PROPORTION)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const proportionScore = proportion * 100.0 * WEIGHT_PROPORTION;
|
|
55
|
+
const chromaWeight = hct.chroma < TARGET_CHROMA ? WEIGHT_CHROMA_BELOW : WEIGHT_CHROMA_ABOVE;
|
|
56
|
+
const chromaScore = (hct.chroma - TARGET_CHROMA) * chromaWeight;
|
|
57
|
+
scoredHct.push({
|
|
58
|
+
hct,
|
|
59
|
+
score: proportionScore + chromaScore
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
scoredHct.sort((a, b) => a.score > b.score ? -1 : a.score < b.score ? 1 : 0);
|
|
63
|
+
const chosenColors = [];
|
|
64
|
+
for (let differenceLimit = 90; differenceLimit >= 15; differenceLimit--) {
|
|
65
|
+
chosenColors.length = 0;
|
|
66
|
+
for (const {
|
|
67
|
+
hct
|
|
68
|
+
} of scoredHct) {
|
|
69
|
+
const duplicateHue = chosenColors.find(chosen => (0, _mathUtils.differenceDegrees)(hct.hue, chosen.hue) < differenceLimit);
|
|
70
|
+
if (!duplicateHue) chosenColors.push(hct);
|
|
71
|
+
if (chosenColors.length >= desired) break;
|
|
72
|
+
}
|
|
73
|
+
if (chosenColors.length >= desired) break;
|
|
74
|
+
}
|
|
75
|
+
const colors = [];
|
|
76
|
+
if (chosenColors.length === 0) colors.push(fallbackColorARGB);
|
|
77
|
+
for (const chosen of chosenColors) colors.push(chosen.toInt());
|
|
78
|
+
return colors;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hct","require","_mathUtils","TARGET_CHROMA","WEIGHT_PROPORTION","WEIGHT_CHROMA_ABOVE","WEIGHT_CHROMA_BELOW","CUTOFF_CHROMA","CUTOFF_EXCITED_PROPORTION","score","colorsToPopulation","options","desired","fallbackColorARGB","filter","colorsHct","huePopulation","Array","fill","populationSum","argb","population","entries","hct","Hct","fromInt","push","hueIndex","Math","floor","hue","hueExcitedProportions","proportion","i","index","sanitizeDegreesInt","scoredHct","round","chroma","proportionScore","chromaWeight","chromaScore","sort","a","b","chosenColors","differenceLimit","length","duplicateHue","find","chosen","differenceDegrees","colors","toInt"],"sourceRoot":"../../../../src","sources":["theme/color-engine/score.ts"],"mappings":";;;;;;AAQA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AATA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAME,aAAa,GAAG,IAAI;AAC1B,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,mBAAmB,GAAG,GAAG;AAC/B,MAAMC,mBAAmB,GAAG,GAAG;AAC/B,MAAMC,aAAa,GAAG,GAAG;AACzB,MAAMC,yBAAyB,GAAG,IAAI;AAQtC;AACO,SAASC,KAAKA,CAACC,kBAAuC,EAAEC,OAAqB,GAAG,CAAC,CAAC,EAAY;EACnG,MAAMC,OAAO,GAAGD,OAAO,CAACC,OAAO,IAAI,CAAC;EACpC,MAAMC,iBAAiB,GAAGF,OAAO,CAACE,iBAAiB,IAAI,UAAU;EACjE,MAAMC,MAAM,GAAGH,OAAO,CAACG,MAAM,IAAI,IAAI;EAErC,MAAMC,SAAgB,GAAG,EAAE;EAC3B,MAAMC,aAAa,GAAG,IAAIC,KAAK,CAAS,GAAG,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;EACpD,IAAIC,aAAa,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AE;EAC3B,IAAIP,YAAY,CAACE,MAAM,KAAK,CAAC,EAAEK,MAAM,CAAC1B,IAAI,CAACb,iBAAiB,CAAC;EAC7D,KAAK,MAAMqC,MAAM,IAAIL,YAAY,EAAEO,MAAM,CAAC1B,IAAI,CAACwB,MAAM,CAACG,KAAK,CAAC,CAAC,CAAC;EAC9D,OAAOD,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.quantizeImage = quantizeImage;
|
|
7
|
+
exports.seedHexFromImagePixels = seedHexFromImagePixels;
|
|
8
|
+
exports.seedsFromImagePixels = seedsFromImagePixels;
|
|
9
|
+
var _index = require("./index.js");
|
|
10
|
+
var _labPointProvider = require("./lab-point-provider.js");
|
|
11
|
+
var _quantizerWu = require("./quantizer-wu.js");
|
|
12
|
+
var _quantizerMap = require("./quantizer-map.js");
|
|
13
|
+
var _score = require("./score.js");
|
|
14
|
+
/**
|
|
15
|
+
* Bloom colour engine — a seed colour from an image.
|
|
16
|
+
*
|
|
17
|
+
* The "theme from your photo/wallpaper" entry point. Wu-quantizes the pixels to
|
|
18
|
+
* a small representative palette, tallies each pixel to its nearest
|
|
19
|
+
* representative (a deterministic single assignment in L*a*b* — Bloom's stand-in
|
|
20
|
+
* for the reference's stochastic k-means, so results are reproducible), then
|
|
21
|
+
* scores the palette for theme suitability. Feed the top result straight into
|
|
22
|
+
* `generateRoleColors({ seed })`.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Quantize `pixels` to a representative palette with its populations. Uses Wu
|
|
27
|
+
* (deterministic) for the palette, then assigns every pixel to its nearest
|
|
28
|
+
* representative in L*a*b* — no randomness, so the same image always yields the
|
|
29
|
+
* same result.
|
|
30
|
+
*/
|
|
31
|
+
function quantizeImage(pixels, maxColors = 128) {
|
|
32
|
+
const representatives = (0, _quantizerWu.quantizeWu)(pixels, maxColors);
|
|
33
|
+
if (representatives.length === 0) return new Map();
|
|
34
|
+
const repPoints = representatives.map(_labPointProvider.labFromInt);
|
|
35
|
+
const populations = new Array(representatives.length).fill(0);
|
|
36
|
+
for (const [pixel, count] of (0, _quantizerMap.countByColor)(pixels).entries()) {
|
|
37
|
+
const point = (0, _labPointProvider.labFromInt)(pixel);
|
|
38
|
+
let best = 0;
|
|
39
|
+
let bestDistance = Infinity;
|
|
40
|
+
for (let i = 0; i < repPoints.length; i++) {
|
|
41
|
+
const repPoint = repPoints[i];
|
|
42
|
+
if (repPoint === undefined) continue;
|
|
43
|
+
const d = (0, _labPointProvider.labDistance)(point, repPoint);
|
|
44
|
+
if (d < bestDistance) {
|
|
45
|
+
bestDistance = d;
|
|
46
|
+
best = i;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
populations[best] = (populations[best] ?? 0) + count;
|
|
50
|
+
}
|
|
51
|
+
const result = new Map();
|
|
52
|
+
for (let i = 0; i < representatives.length; i++) {
|
|
53
|
+
const representative = representatives[i];
|
|
54
|
+
const population = populations[i] ?? 0;
|
|
55
|
+
if (representative !== undefined && population > 0) result.set(representative, population);
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Ranked seed candidates (best first) extracted from an image's pixels (ARGB). */
|
|
61
|
+
function seedsFromImagePixels(pixels, options) {
|
|
62
|
+
return (0, _score.score)(quantizeImage(pixels), options);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** The single best seed colour from an image, as `#rrggbb`. */
|
|
66
|
+
function seedHexFromImagePixels(pixels) {
|
|
67
|
+
const [top] = seedsFromImagePixels(pixels, {
|
|
68
|
+
desired: 1
|
|
69
|
+
});
|
|
70
|
+
if (top === undefined) throw new Error('no seed colour could be extracted');
|
|
71
|
+
return (0, _index.hexFromArgb)(top);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=seed-from-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","_labPointProvider","_quantizerWu","_quantizerMap","_score","quantizeImage","pixels","maxColors","representatives","quantizeWu","length","Map","repPoints","map","labFromInt","populations","Array","fill","pixel","count","countByColor","entries","point","best","bestDistance","Infinity","i","repPoint","undefined","d","labDistance","result","representative","population","set","seedsFromImagePixels","options","score","seedHexFromImagePixels","top","desired","Error","hexFromArgb"],"sourceRoot":"../../../../src","sources":["theme/color-engine/seed-from-image.ts"],"mappings":";;;;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,aAAaA,CAACC,MAAgB,EAAEC,SAAS,GAAG,GAAG,EAAuB;EACpF,MAAMC,eAAe,GAAG,IAAAC,uBAAU,EAACH,MAAM,EAAEC,SAAS,CAAC;EACrD,IAAIC,eAAe,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,IAAIC,GAAG,CAAC,CAAC;EAClD,MAAMC,SAAqB,GAAGJ,eAAe,CAACK,GAAG,CAACC,4BAAU,CAAC;EAE7D,MAAMC,WAAW,GAAG,IAAIC,KAAK,CAASR,eAAe,CAACE,MAAM,CAAC,CAACO,IAAI,CAAC,CAAC,CAAC;EACrE,KAAK,MAAM,CAACC,KAAK,EAAEC,KAAK,CAAC,IAAI,IAAAC,0BAAY,EAACd,MAAM,CAAC,CAACe,OAAO,CAAC,CAAC,EAAE;IAC3D,MAAMC,KAAK,GAAG,IAAAR,4BAAU,EAACI,KAAK,CAAC;IAC/B,IAAIK,IAAI,GAAG,CAAC;IACZ,IAAIC,YAAY,GAAGC,QAAQ;IAC3B,KAA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