{"_id":"@cjser/simple-color-palette","name":"@cjser/simple-color-palette","dist-tags":{"latest":"0.2.1-cjser.2"},"versions":{"0.2.1-cjser.2":{"name":"@cjser/simple-color-palette","version":"0.2.1-cjser.2","description":"A JavaScript implementation of the Simple Color Palette format — a minimal JSON-based file format for defining color palettes","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"keywords":["color","colour","palette","clr","ase","swatch","json","list","collection","hex","css"],"devDependencies":{"ava":"^6.2.0","typescript":"^5.8.3","xo":"^0.60.0"},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"0.2.1","cjserVersion":2,"original":{"name":"simple-color-palette","version":"0.2.1","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"simple-color-palette/javascript-package","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/simple-color-palette@0.2.1-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-h6KpGvm0e1ucjJgeGiacqouRDc/VAaR38CtmnoQZVPnRLvNtCwO47Cx15C9pRar4hXyuoXIfe001fdZ+j30IXQ==","shasum":"d57e27a3906b74b79ae863fcbaa27a202c511499","tarball":"https://registry.npmjs.org/@cjser/simple-color-palette/-/simple-color-palette-0.2.1-cjser.2.tgz","fileCount":6,"unpackedSize":22409,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGUFHIk4g3hNN5xGIb/1DFZ5m2U0I2NadgRpIY2v2LH2AiB41BLpjK7toDEGOt2+eIh4culNKJQGrArAT+jW4CTaiQ=="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-color-palette_0.2.1-cjser.2_1778159984963_0.870000991422234"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T13:19:44.873Z","0.2.1-cjser.2":"2026-05-07T13:19:45.113Z","modified":"2026-05-07T13:19:45.301Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"A JavaScript implementation of the Simple Color Palette format — a minimal JSON-based file format for defining color palettes","keywords":["color","colour","palette","clr","ase","swatch","json","list","collection","hex","css"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# simple-color-palette\n\n> A JavaScript implementation of the [Simple Color Palette](https://simplecolorpalette.com) format — a minimal JSON-based file format for defining color palettes\n\n*Feedback wanted on the API.*\n\n## Install\n\n```sh\nnpm install simple-color-palette\n```\n\n## Usage\n\n```js\nimport ColorPalette from 'simple-color-palette';\n\nconst redColor = new ColorPalette.Color({\n\tname: 'Red',\n\tred: 1,\n\tgreen: 0,\n\tblue: 0,\n});\n\nconst greenColor = new ColorPalette.Color({\n\tname: 'Green',\n\tred: 0,\n\tgreen: 1,\n\tblue: 0,\n});\n\nconst palette = new ColorPalette({\n\tname: 'Traffic Lights',\n\tcolors: [\n\t\tredColor,\n\t\tgreenColor\n\t],\n});\n\nconsole.log(redColor.components);\n// {red: 1, green: 0, blue: 0, opacity: 1}\n\n// Modify color components\nredColor.red = 0.9;\n\n// Serialize to string\nconst serialized = palette.serialize();\n\n// Load from serialized data\nconst loadedPalette = ColorPalette.deserialize(serialized);\n```\n\n## API\n\nSee [types](index.d.ts).\n\n## Note\n\nThe palette operates in non-linear sRGB, while the serialized version is in linear (gamma-corrected) sRGB for precision.\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/simple-color-palette/javascript-package\n","readmeFilename":"readme.md","_rev":"1-b9569a18fe4779c62e68b8222f6d05e7"}