{"_id":"@4bitlabs/inclusive-color-space","_rev":"4-8cd3dc60561523272b3805d063b8903c","name":"@4bitlabs/inclusive-color-space","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@4bitlabs/inclusive-color-space","version":"0.1.0","keywords":["color","color-picker","skin-tones","procgen","inclusive-color-space"],"license":"ISC","_id":"@4bitlabs/inclusive-color-space@0.1.0","maintainers":[{"name":"32bitkid","email":"32bitkid@gmail.com"}],"dist":{"shasum":"c608a3846ddc734a76ee22c5d0e3fd34d3774b98","tarball":"https://registry.npmjs.org/@4bitlabs/inclusive-color-space/-/inclusive-color-space-0.1.0.tgz","fileCount":22,"integrity":"sha512-w24myKq5KgzRUjApq/EG1WdiAi9DT18aZBGeTrLK5w8SBajJgoPDOx2AM3q3ub4hb3esgVjoA3r/FByBkvOH1A==","signatures":[{"sig":"MEYCIQDjd8NhB76XEcQXZMVfDoEZ67tRk/qjl0qWnjM/iS25PgIhAMJL1g4E22l3Try0uX7gTghRRVCYz6tqo8XJN1k18VN4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17363},"type":"module","exports":{".":{"types":"./dist/default.d.ts","import":"./dist/default.js"},"./minimum":{"types":"./dist/minimum.d.ts","import":"./dist/minimum.js"},"./advanced":{"types":"./dist/advanced.d.ts","import":"./dist/advanced.js"}},"gitHead":"81be9df46c6f8632eeb78a6ae8284c2451e42eea","scripts":{"test":"vitest run","build":"tsdown","test:dev":"vitest","clean:wipe":"rimraf ./dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"32bitkid","email":"32bitkid@gmail.com"},"_npmVersion":"12.0.1","description":"A inclusive human skin-color based color picker extended from https://toneyalexander.github.io/inclusive-color-space","directories":{},"_nodeVersion":"22.23.1","allowScripts":{"fsevents@2.3.3":true},"dependencies":{"@4bitlabs/color-space":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","tsdown":"^0.22.14","vitest":"^4.1.10","typescript":"^6.0.3","@biomejs/biome":"2.5.6","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/inclusive-color-space_0.1.0_1785723028777_0.08738027457462083","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@4bitlabs/inclusive-color-space","version":"0.1.1","keywords":["color","color-picker","skin-tones","procgen","inclusive-color-space"],"author":{"name":"J. Holmes","email":"j@holmes.codes"},"license":"ISC","_id":"@4bitlabs/inclusive-color-space@0.1.1","maintainers":[{"name":"32bitkid","email":"32bitkid@gmail.com"}],"homepage":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/","bugs":{"url":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/issues"},"dist":{"shasum":"ef753b8346c6cffeb95f55eb051cb5ab0aea8c81","tarball":"https://registry.npmjs.org/@4bitlabs/inclusive-color-space/-/inclusive-color-space-0.1.1.tgz","fileCount":22,"integrity":"sha512-CYKiNCF7W5KUvEUcaJ9bh8JZSUKrfsSq6wFmSNKrxYlwEahSkVEXCe8x4fG4oNtIoaBA5R3kZGArpnUcG872rQ==","signatures":[{"sig":"MEUCIQDGIZlF+CBYEsx0LAN0MRs+8wXrl4RRhqJ/8rqjxtFSGAIgRuiYz6HStVW3BDVtFmtTbT5UShyetbWoTSPONT+VZzM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18382},"type":"module","exports":{".":{"types":"./dist/default.d.ts","import":"./dist/default.js"},"./cartoon":{"types":"./dist/cartoon.d.ts","import":"./dist/cartoon.js"},"./minimum":{"types":"./dist/minimum.d.ts","import":"./dist/minimum.js"},"./advanced":{"types":"./dist/advanced.d.ts","import":"./dist/advanced.js"}},"gitHead":"b5ed6f6bade935097b4b5a405f5419df07ad47d1","scripts":{"test":"vitest run","build":"tsdown","test:dev":"vitest","clean:wipe":"rimraf ./dist","format:fix":"biome check --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"32bitkid","email":"32bitkid@gmail.com"},"repository":{"url":"git+https://github.com/32bitkid/4bitlabs.inclusive-color-space.git","type":"git"},"_npmVersion":"12.0.1","description":"A inclusive human skin-color based color picker extended from https://toneyalexander.github.io/inclusive-color-space","directories":{},"_nodeVersion":"22.23.1","allowScripts":{"fsevents@2.3.3":true},"dependencies":{"@4bitlabs/color-space":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","tsdown":"^0.22.14","vitest":"^4.1.10","typescript":"^6.0.3","@biomejs/biome":"2.5.6","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/inclusive-color-space_0.1.1_1785723406101_0.45759653577710924","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@4bitlabs/inclusive-color-space","version":"0.1.2","keywords":["color","color-picker","skin-tones","procgen","inclusive-color-space"],"author":{"name":"J. Holmes","email":"j@holmes.codes"},"license":"ISC","_id":"@4bitlabs/inclusive-color-space@0.1.2","maintainers":[{"name":"32bitkid","email":"32bitkid@gmail.com"}],"homepage":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/","bugs":{"url":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/issues"},"dist":{"shasum":"68fae66c18efce4bcc2dad73fd50fec49c25d6d4","tarball":"https://registry.npmjs.org/@4bitlabs/inclusive-color-space/-/inclusive-color-space-0.1.2.tgz","fileCount":22,"integrity":"sha512-Xj/DJzzyHvuwcxwQFhFZOo2dKHIxbDJ8Svdf2QQ+hC35pPdEs3D8nLOdP7gPiKRpYSK04LdPelJGXjMLl6PjOw==","signatures":[{"sig":"MEUCIQDQM7VtnCMCxlUleuIH7U4DG3CuzeSudDiam+R22BKXaAIgXtSBxrpdTw1jh2Fj3eNPaDey7CQHcp2il1aEXG7NUPI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18645},"type":"module","exports":{".":{"types":"./dist/default.d.ts","import":"./dist/default.js"},"./cartoon":{"types":"./dist/cartoon.d.ts","import":"./dist/cartoon.js"},"./minimum":{"types":"./dist/minimum.d.ts","import":"./dist/minimum.js"},"./advanced":{"types":"./dist/advanced.d.ts","import":"./dist/advanced.js"}},"gitHead":"29488cdac13c469f367d9fc00b2203c8fdebb57a","scripts":{"test":"vitest run","build":"tsdown","test:dev":"vitest","clean:wipe":"rimraf ./dist","format:fix":"biome check --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"32bitkid","email":"32bitkid@gmail.com"},"repository":{"url":"git+https://github.com/32bitkid/4bitlabs.inclusive-color-space.git","type":"git"},"_npmVersion":"12.0.1","description":"A inclusive human skin-color based color picker extended from https://toneyalexander.github.io/inclusive-color-space","directories":{},"_nodeVersion":"22.23.1","allowScripts":{"fsevents@2.3.3":true},"dependencies":{"@4bitlabs/color-space":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.1.3","tsdown":"^0.22.14","vitest":"^4.1.10","typescript":"^6.0.3","@biomejs/biome":"2.5.6","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"tmp":"tmp/inclusive-color-space_0.1.2_1785724347212_0.12788987825944642","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@4bitlabs/inclusive-color-space","version":"0.2.0","description":"A inclusive human skin-color based color picker extended from https://toneyalexander.github.io/inclusive-color-space","keywords":["color","color-picker","skin-tones","procgen","inclusive-color-space"],"homepage":"https://32bitkid.github.io/4bitlabs.inclusive-color-space/","bugs":{"url":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/issues"},"repository":{"type":"git","url":"git+https://github.com/32bitkid/4bitlabs.inclusive-color-space.git"},"license":"ISC","author":{"name":"J. Holmes","email":"j@holmes.codes"},"type":"module","exports":{".":{"types":"./dist/default.d.ts","import":"./dist/default.js"},"./advanced":{"types":"./dist/advanced.d.ts","import":"./dist/advanced.js"},"./subtle":{"types":"./dist/subtle.d.ts","import":"./dist/subtle.js"},"./cartoon":{"types":"./dist/cartoon.d.ts","import":"./dist/cartoon.js"}},"scripts":{"build":"tsdown","clean:wipe":"rimraf ./dist","docs":"typedoc --options typedoc.json","docs:rebuild":"rimraf docs/ && npm run docs","format:fix":"biome check --write","prepublishOnly":"npm run build","test":"vitest run","test:dev":"vitest"},"dependencies":{"@4bitlabs/color-space":"^3.0.2"},"devDependencies":{"@biomejs/biome":"2.5.6","@vitest/coverage-v8":"^4.1.10","rimraf":"^6.1.3","tsdown":"^0.22.14","typedoc":"^0.28.20","typedoc-plugin-mdn-links":"^5.1.1","typedoc-plugin-missing-exports":"^4.1.4","typescript":"^6.0.3","vitest":"^4.1.10"},"allowScripts":{"fsevents@2.3.3":true},"gitHead":"0eb7b05415cac30541c7cbf96f03ad8fa1a70cf6","_id":"@4bitlabs/inclusive-color-space@0.2.0","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-PgrjDP8jR9ZkiPTendlZMXU7c1KSm97UpLT0ILSxQFwFLvSlLn5/NBg9yG2YKoJtUseyHRnURXdiFn0k64NYMA==","shasum":"fba3f82d74bb41f33941ac582ce1457aea239bc9","tarball":"https://registry.npmjs.org/@4bitlabs/inclusive-color-space/-/inclusive-color-space-0.2.0.tgz","fileCount":22,"unpackedSize":31650,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDKm+v4Alo9lZpScnEteP/oAyO6145TCoAreID02N6Z6wIhAMVhaLOVdaSbr3fnE4kFRw4NSERP1AxSAwTbyh3Ms+Wr"}]},"_npmUser":{"name":"32bitkid","email":"32bitkid@gmail.com"},"directories":{},"maintainers":[{"name":"32bitkid","email":"32bitkid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/inclusive-color-space_0.2.0_1785784830965_0.8451981067059011"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T02:10:28.511Z","modified":"2026-08-03T19:20:31.280Z","0.1.0":"2026-08-03T02:10:28.901Z","0.1.1":"2026-08-03T02:16:46.257Z","0.1.2":"2026-08-03T02:32:27.365Z","0.2.0":"2026-08-03T19:20:31.117Z"},"bugs":{"url":"https://github.com/32bitkid/4bitlabs.inclusive-color-space/issues"},"author":{"name":"J. Holmes","email":"j@holmes.codes"},"license":"ISC","homepage":"https://32bitkid.github.io/4bitlabs.inclusive-color-space/","keywords":["color","color-picker","skin-tones","procgen","inclusive-color-space"],"repository":{"type":"git","url":"git+https://github.com/32bitkid/4bitlabs.inclusive-color-space.git"},"description":"A inclusive human skin-color based color picker extended from https://toneyalexander.github.io/inclusive-color-space","maintainers":[{"name":"32bitkid","email":"32bitkid@gmail.com"}],"readme":"# @4bitlabs/inclusive-color-space\n\n[![License][license]][npm]\n[![NPM Version][version]][npm]\n[![NPM Downloads][dl]][npm]\n[![Ko-fi][kofibadge]][kofi]\n\n[npm]: https://www.npmjs.com/package/@4bitlabs/inclusive-color-space\n[version]: https://img.shields.io/npm/v/%404bitlabs%2Finclusive-color-space\n[license]: https://img.shields.io/npm/l/%404bitlabs%2Finclusive-color-space\n[dl]: https://img.shields.io/npm/dy/%404bitlabs%2Finclusive-color-space\n[kofibadge]: https://shields.io/badge/ko--fi-donate-ff5f5f?logo=ko-fi&style=for-the-badgeKo-fi\n[kofi]: https://ko-fi.com/thirty-two\n\nA simple color-generator for procedurally-generated \"realistic\" skin-tones. Adapted from\n[https://toneyalexander.github.io/inclusive-color-space][link] with a few adjustments.\n\n```ts\nfunction picker<T>(deepFair: number, blush: number, temperature: number): T;\n```\n\nThe all the arguments are mapped to \\[&minus;100, +100\\], as opposed to the original implementation that is \\[&minus;1, 1\\].\n\n| Aspect               | Argument       | Range                | [Original Variable][link] | \n|----------------------|----------------|----------------------|:-------------------------:|\n| Deep&ndash;Fair      | `deepFair`     | \\[&minus;100, +100\\] |           `+T`            |\n| Ochre&ndash;Flushed  | `blush`       | \\[&minus;100, +100\\] |           `-U`            |\n| Cool&ndash;Warm      | `temperature` | \\[&minus;100, +100\\] |           `+V`            |\n\n> [!Note]\n> These values _do not_ directly map to the original implementation; namely `blush` is inverted from the `U` variable of\n> the reference implementation, where _ochre_ is _positive_, while _flushed_ is _negative_.\n\n\n_By default_, the pickers will map the square `deepFair`/`blush` X/Y square-space onto the\ndisc constrained by `temperature` within the domain sphere using [Shirley-Chiu \"A Low Distortion Map Between Disk and Square\"][shirley].\n\n## Examples\n\nUsing the `default` color picker.\n\n```ts\nimport skintone from '@4bitlabs/inclusive-color-space';\n\nconst skinColor = skintone(0, 0, 0); // '#be7c50'\n```\n\n## Variations\n\n| Aspect       | Arguments              |           |\n|--------------|------------------------|:----------|\n| Deeper       | `skinTones(-75, 0, 0)` | `#6b3523` |\n| Fairer       | `skinTones(75, 0, 0)`  | `#e8c5ae` |\n| &minus;Blush | `skinTones(0, -75, 0)` | `#b98849` |\n| +Blush       | `skinTones(0, 75, 0)`  | `#c37057` |\n| Cooler       | `skinTones(0, 0, -75)` | `#ac7d66` |\n| Warmer       | `skinTones(0, 0, 75)`  | `#d17b3a` |\n\n## Advanced\n\nCreating a new picker with a custom `r²` value, you can use the exports from `@4bitlabs/inclusive-color-space/advanced`\n\n```ts\nimport { createHexPicker } from '@4bitlabs/inclusive-color-space/advanced'\n\nconst skinTones = createHexPicker(4.0)\n```\n\nYou can also create non-sphere constrained pickers by passing `{ constrained: false }`. This\nwill act a lot more like the original implementation, as written, but can produce some anomolous \nvalues, especially at higher `r²` sizes. \n\n```ts\nimport { createHexPicker } from '@4bitlabs/inclusive-color-space/advanced'\n\n// Create a picker with the default r² value, but mapped to the temperature disc\nconst skinTones = createHexPicker(1.5, { mapping: 'square' })\n```\n\nThis package, also exports more specific colorpsace pickers than the default hex generator, when more control is required. \nSee the code for details:\n\n```ts\nimport { createTUVPicker, createSRGBPicker } from '@4bitlabs/inclusive-color-space/advanced';\n\nconst srgbPicker = createSRGBPicker(1.5);\nconst srgbTuple = srgbPicker(0, 0, 0); // [\"sRGB\", 190, 124, 80]\n\n/* or */\n\nconst tuvPicker = createTUVPicker(1.5);\nconst tuvTuple = tuvPicker(50, 50, 0); // [\"inclusive-tuv\", 0.43301270189221924, -0.4330127018922193, 0]\n```\n\n\n[link]: https://toneyalexander.github.io/inclusive-color-space/#picker-ui\n[shirley]: https://www.tandfonline.com/doi/abs/10.1080/10867651.1997.10487479","readmeFilename":"README.md"}