{"_id":"@edelstone/tints-and-shades","_rev":"8-e73ffb5eba299f72662739223344a3aa","name":"@edelstone/tints-and-shades","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@edelstone/tints-and-shades","version":"0.1.0","license":"MIT","_id":"@edelstone/tints-and-shades@0.1.0","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"dist":{"shasum":"e2e8f1488ef2f77bea629cd62d099016eff3e6d9","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.0.tgz","fileCount":6,"integrity":"sha512-wj/Nm8REF6eDfWzTVY3+FlNe5DU5vtseBcNjhdFzUe1R0tgoMTqw/cVu30XPOexpY3p4NHCz5Dy0G3Nb+V9opA==","signatures":[{"sig":"MEYCIQCWGJs53OqFbhVnp7dZ+jyu5v6PkOTO0PwGeqk22nTc2QIhAKrjQvYAgeCESnAwnJD/Ri1pvfTxne0fHL8LI3aJlTPa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5568},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8bf4bd179cb94aa5c4bf97be4880020305b0be3b","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"_npmVersion":"11.7.0","description":"Core tint and shade calculation API used by tints-and-shades.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.0_1770950503869_0.38814257788613693","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@edelstone/tints-and-shades","version":"0.1.2","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.1.2","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://github.com/edelstone/tints-and-shades","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"e42612e3d775ba4a1e0930947d598fc223298d2c","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.2.tgz","fileCount":6,"integrity":"sha512-kTwDbvzc9+8YL7QTqpBVkR3tUxm0LZtm9837xjbtUDLupVWad4xDqf0S/joh6DQN2b7Y+vV/bM6sioBRafOrwQ==","signatures":[{"sig":"MEYCIQC1IGoXiBpH3mjkSUTY0rnA5PFw0ImTf8IIe4DVZpHBqwIhAIwiH6i0CvJH7aAiKyf8PhKkJBy6BliUe/XbZ+O3r9gp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6039},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8bf4bd179cb94aa5c4bf97be4880020305b0be3b","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Core tint and shade calculation API used by tints-and-shades.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.2_1770951285319_0.39159606768255295","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@edelstone/tints-and-shades","version":"0.1.3","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.1.3","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"1580982d3a030bfe2cc5b5a7f0b33c1850ab2d61","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.3.tgz","fileCount":6,"integrity":"sha512-oaNzmcCzuBXa6mzQh9s9cXiSmvCCqp5KX4PH5PcpAbIWitjIBN7WENx8sEHVPOCQ/qmZP7bSpP/FlqGHj2jTFQ==","signatures":[{"sig":"MEUCIQD1ooJVNhVg9s6dZGawxdwxMU5IRP+LGh7hp8Ji2LddpgIgDwrU1lUj7zdkjun8oEGJufD1iW9GwSBTJxgysX6toMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6024},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8bf4bd179cb94aa5c4bf97be4880020305b0be3b","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Core tint and shade calculation API used by tints-and-shades.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.3_1770951378194_0.624507797948118","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@edelstone/tints-and-shades","version":"0.1.4","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.1.4","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"e889a0c25316c1e9e0ea2d03c626bfa55ce0f3d5","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.4.tgz","fileCount":6,"integrity":"sha512-kyN8hyd+uslJFhWLegEpxj3WGR8UIQw7kCMh4LcHD5o9ydE7BAmtuJMz37qFRoWePSdw3Fo/Lu9jb/kwqruPyA==","signatures":[{"sig":"MEQCIHU5Y9P96YzhdrCAtX9VdRIAC82x5zICveawObhQMwpDAiBtD33qffWPcq3lkyhYtbeHWd/ATParmpNBZAbfDSBfPQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6029},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8bf4bd179cb94aa5c4bf97be4880020305b0be3b","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Deterministic tint and shade generator for 6-character hex colors.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.4_1770953832118_0.6451379244817095","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@edelstone/tints-and-shades","version":"0.1.5","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.1.5","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"f56d6f02b46c9a46403d3ddbce74813ad04fd6f1","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.5.tgz","fileCount":6,"integrity":"sha512-wh+mRQQBcgeCiRMClhGBe6Hm0cNhQVhwOp/J8HmFHv94wnMiLgQtE86FITVumneCh64QRLQO8foBCQO4lq6cXQ==","signatures":[{"sig":"MEYCIQDs7o03ZuYQ38tHmC4oqxk98c4/+QpeWwe5QILQneUf/wIhAL0HP2sCFVlIyJbkJhQ62sxnF60tEdXx+Z9HkkMIlWcp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6046},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5e027c18bfee4f416d68f6393ce87128eda881e2","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Deterministic tint and shade generator for 6-character hex colors.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.5_1770956709296_0.918133002125056","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@edelstone/tints-and-shades","version":"0.1.6","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.1.6","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"8a3c81c8ed571bbf81bc71054a0ddad74ec20332","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.1.6.tgz","fileCount":6,"integrity":"sha512-qYXZHZ6i0PtEbFt8/zPqHXJQUsQswLoBrd1p9W+vsjfvFg9+03sVr2jL6kBPbIUr/6jNt031S07Qk7m8JElkHw==","signatures":[{"sig":"MEUCIDOXJxGClsWyrt6VpM8Q0IRyoASUJh2ZsxaFgqm8U6PpAiEA5JzKTX7fCZNL1lhXLRc7ztjAty5Lhq6Ms2db1zU4f3E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6051},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c0dadd388c46a1468dd11d8f926e04c02076abd7","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Deterministic tint and shade generator for 6-character hex colors.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.1.6_1771000185151_0.6835658131198423","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@edelstone/tints-and-shades","version":"0.2.0","keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"license":"MIT","_id":"@edelstone/tints-and-shades@0.2.0","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"dist":{"shasum":"9c672b342fbee7671cb01621561d30ca1ad25d7d","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.2.0.tgz","fileCount":8,"integrity":"sha512-OK0BjVd7fuKzaeUCiwFtJu3SeX480H/Q1YF2SVVOlmAP2UYd5FIAon+8ZmPlBKGFTM/JgnggscqKTspkd9YnsA==","signatures":[{"sig":"MEQCIBtQgqNEGCDffMEPBeXzCNsetJOD2gQ3GUKmEx3VtTJdAiA1+OThPxRB2klLLAc9X7FyOXJblyWDmAXRbQPdQMEOAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11213},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"68ded1cca604d6f2188b3dfdac7e3c2c508aec4f","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"repository":{"url":"git+https://github.com/edelstone/tints-and-shades.git","type":"git","directory":"packages/tints-and-shades"},"_npmVersion":"11.7.0","description":"Deterministic color toolkit for tints, shades, color-wheel relationships, hex normalization, and hex/RGB/HSL conversion.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/tints-and-shades_0.2.0_1771247699696_0.15540556895494584","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@edelstone/tints-and-shades","repository":{"type":"git","url":"git+https://github.com/edelstone/tints-and-shades.git","directory":"packages/tints-and-shades"},"homepage":"https://maketintsandshades.com","bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"engines":{"node":">=18"},"version":"0.2.1","description":"Deterministic color toolkit for tints, shades, color-wheel relationships, hex normalization, and hex/RGB/HSL conversion.","license":"MIT","type":"module","publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"sideEffects":false,"scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist","test":"npm run build && node --test test/*.test.mjs","prepublishOnly":"npm run clean && npm run build"},"devDependencies":{"typescript":"^5.7.0"},"keywords":["color","tint","shade","hex","design","typescript"],"author":{"name":"Michael Edelstone"},"gitHead":"b97ee0644f0b18107e56ca88fed65e57b8d4b273","_id":"@edelstone/tints-and-shades@0.2.1","_nodeVersion":"20.19.6","_npmVersion":"11.7.0","dist":{"integrity":"sha512-hDKHVNr6p2kds1DYCre27Y9bI/Vuzlrk/7yIqf19CrFEbyCYFXHWDIyin1xpMUetBSI6BBqiqfP3QAXGo1NcOg==","shasum":"11ca8324c3256a402b705fad2b14befcb88c7a52","tarball":"https://registry.npmjs.org/@edelstone/tints-and-shades/-/tints-and-shades-0.2.1.tgz","fileCount":8,"unpackedSize":11339,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqRK5Jx2mb6Yhwe8DMZ7AiCvyu9sAZIThd3DRp7vvBxgIhAOVLIamiMokYyA3+ov02gGy4fV2buBt3NBchVrtINaHf"}]},"_npmUser":{"name":"edelstone","email":"michael.edelstone@gmail.com"},"directories":{},"maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tints-and-shades_0.2.1_1771248910354_0.29833442613075434"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-13T02:41:43.714Z","modified":"2026-02-16T13:35:10.647Z","0.1.0":"2026-02-13T02:41:44.019Z","0.1.2":"2026-02-13T02:54:45.463Z","0.1.3":"2026-02-13T02:56:18.397Z","0.1.4":"2026-02-13T03:37:12.285Z","0.1.5":"2026-02-13T04:25:09.446Z","0.1.6":"2026-02-13T16:29:45.309Z","0.2.0":"2026-02-16T13:14:59.833Z","0.2.1":"2026-02-16T13:35:10.514Z"},"bugs":{"url":"https://github.com/edelstone/tints-and-shades/issues"},"author":{"name":"Michael Edelstone"},"license":"MIT","homepage":"https://maketintsandshades.com","keywords":["color","tint","shade","hex","design","typescript"],"repository":{"type":"git","url":"git+https://github.com/edelstone/tints-and-shades.git","directory":"packages/tints-and-shades"},"description":"Deterministic color toolkit for tints, shades, color-wheel relationships, hex normalization, and hex/RGB/HSL conversion.","maintainers":[{"name":"edelstone","email":"michael.edelstone@gmail.com"}],"readme":"# @edelstone/tints-and-shades\n\nDeterministic color toolkit for tints, shades, color-wheel relationships, hex normalization, and hex/RGB/HSL conversion.  \nUsed internally by the [Tint & Shade Generator](https://maketintsandshades.com) and published here as a standalone API.\n\n## Install\n\n_Prerequisites: Node.js 18+_\n\n```bash\nnpm install @edelstone/tints-and-shades\n```\n\n## Quick example\n\n### Input\n\n```js\nimport {\n  normalizeHex,\n  calculateTints,\n  calculateShades,\n  getComplementaryHex\n} from \"@edelstone/tints-and-shades\";\n\nconst baseHex = normalizeHex(\"#3bf\"); // \"33bbff\"\nif (!baseHex) throw new Error(\"Invalid color\");\n\nconst tints = calculateTints(baseHex, [0, 0.5, 1]);\nconst shades = calculateShades(baseHex, [0, 0.5, 1]);\nconst complementary = getComplementaryHex(baseHex);\n```\n\n### Output\n\n```json\n{\n  \"complementary\": \"ff7733\",\n  \"tints\": [\n    { \"hex\": \"33bbff\", \"ratio\": 0, \"percent\": 0 },\n    { \"hex\": \"99ddff\", \"ratio\": 0.5, \"percent\": 50 },\n    { \"hex\": \"ffffff\", \"ratio\": 1, \"percent\": 100 }\n  ],\n  \"shades\": [\n    { \"hex\": \"33bbff\", \"ratio\": 0, \"percent\": 0 },\n    { \"hex\": \"1a5e80\", \"ratio\": 0.5, \"percent\": 50 },\n    { \"hex\": \"000000\", \"ratio\": 1, \"percent\": 100 }\n  ]\n}\n```\n\n## API\n\n### Generation\n\n```ts\ncalculateTints(colorValue: string, steps?: number[]): ScaleColor[]\ncalculateShades(colorValue: string, steps?: number[]): ScaleColor[]\n\ntype ScaleColor = {\n  hex: string;\n  ratio: number;\n  percent: number;\n};\n```\n\nDefault steps: `[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]`\n\n### Normalization\n\n```ts\nnormalizeHex(value: string): string | null\n```\n\nReturns canonical 6-character lowercase hex without `#` (3-character hex is expanded), or `null` if invalid.\n\n### Relationships\n\n```ts\ngetComplementaryHex(colorValue: string): string\ngetSplitComplementaryHexes(colorValue: string): [string, string]\ngetAnalogousHexes(colorValue: string): [string, string]\ngetTriadicHexes(colorValue: string): [string, string]\n```\n\nHue is rotated by standard offsets while preserving saturation and lightness.\n\n### Conversions\n\n```ts\nhexToRgb(colorValue: string): RGB\nrgbToHex(rgb: RGB): string\nrgbToHsl(rgb: RGB): HSL\nhslToRgb(hsl: HSL): RGB\n\ntype RGB = {\n  red: number;\n  green: number;\n  blue: number;\n};\n\ntype HSL = {\n  hue: number;\n  saturation: number;\n  lightness: number;\n};\n```\n\nConverts between hex, RGB, and HSL using deterministic channel clamping and standard HSL conversion math.\n\n## Validation rules\n\n- Generation requires a 6-character hex string (no `#`) and finite numeric steps.\n- Relationship and conversion helpers accept valid 3- or 6-character hex (optional `#`).\n- `normalizeHex` returns `null` for invalid input.\n- Other helpers throw `TypeError` for invalid input.\n- All returned hex strings are lowercase 6-character values without `#`.\n","readmeFilename":"README.md"}