{"_id":"@andbc/pigment","_rev":"4-00882295ca8a58acad1b706bf6954bde","name":"@andbc/pigment","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.2":{"name":"@andbc/pigment","version":"0.0.2","author":{"name":"Andy Duboc"},"license":"MIT","_id":"@andbc/pigment@0.0.2","maintainers":[{"name":"andbc","email":"a@andbc.co"}],"bin":{"pigment":"dist/index.js"},"dist":{"shasum":"ae6f41a88b0298dc525783b735eaa0e05dfaae72","tarball":"https://registry.npmjs.org/@andbc/pigment/-/pigment-0.0.2.tgz","fileCount":4,"integrity":"sha512-NJn4Q4sCLtTgi00LW1YC+zFUIyjJMnZ0i2d/zDvU6Rs4ry1l+kSpiAhG4INZ12uqrbN+el8Oi2Z2+eZyqE+OzQ==","signatures":[{"sig":"MEYCIQCUscmHNhYDCLHpt2Y2KXpbes8/2IZKBNI5LVodMf4+yAIhAPr2TkqwJ3aFqYRtkjlidYc+mlLh6xh3jyOjoiL5YYVH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12795},"main":"index.js","type":"module","gitHead":"70fa0174b710484b8c7b88a5798bdecd5d3a81d7","scripts":{"build":"tsc --noemit && tsup ./src/index.ts --format esm","watch":"tsup ./src/index.ts --format esm --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"andbc","email":"a@andbc.co"},"_npmVersion":"11.8.0","description":"A CLI tool to convert colors between different formats (HEX, RGB, HSL, etc.)","directories":{},"_nodeVersion":"25.6.0","dependencies":{"yargs":"17.7.2","@texel/color":"^1.1.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","@types/node":"^25.0.8","@types/yargs":"^17.0.35"},"_npmOperationalInternal":{"tmp":"tmp/pigment_0.0.2_1776286376953_0.45270597071092666","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@andbc/pigment","version":"0.0.3","author":{"name":"Andy Duboc"},"license":"MIT","_id":"@andbc/pigment@0.0.3","maintainers":[{"name":"andbc","email":"a@andbc.co"}],"homepage":"https://github.com/andydbc/pigment#readme","bugs":{"url":"https://github.com/andydbc/pigment/issues"},"bin":{"pigment":"dist/index.js"},"dist":{"shasum":"038168189bd9b8d1798d93d848a596002f8aa616","tarball":"https://registry.npmjs.org/@andbc/pigment/-/pigment-0.0.3.tgz","fileCount":4,"integrity":"sha512-YU9Is3fhoYWtaQh7hY1gCH+GyHwhxemO8+1MyQBJIjJOwSo5t3Ch/vdKKmDc7HdmCe2zL78gtFN0wB5ULS9MAQ==","signatures":[{"sig":"MEYCIQDxgRWVDkR2XKfQm/cGa1T2SfcCahjfMo3igArBrv6XrgIhAMLPKY+oGfv55P3SnBoTgVJ9YYybTAES4G2yVx1gm8yu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12824},"main":"index.js","type":"module","gitHead":"354fe4463672ab5a3adb44efd64c2b42e58b7191","scripts":{"dev":"tsup --watch","build":"tsc --noemit && tsup ./src/index.ts --format esm","prepublishOnly":"yarn build"},"_npmUser":{"name":"andbc","email":"a@andbc.co"},"repository":{"url":"git+https://github.com/andydbc/pigment.git","type":"git"},"_npmVersion":"11.8.0","description":"A CLI tool to convert colors between different formats (HEX, RGB, HSL, etc.)","directories":{},"_nodeVersion":"25.6.0","dependencies":{"yargs":"17.7.2","@texel/color":"^1.1.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","@types/node":"^25.0.8","@types/yargs":"^17.0.35"},"_npmOperationalInternal":{"tmp":"tmp/pigment_0.0.3_1776287158896_0.012714586499214642","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@andbc/pigment","version":"0.0.4","author":{"name":"Andy Duboc"},"license":"MIT","_id":"@andbc/pigment@0.0.4","maintainers":[{"name":"andbc","email":"a@andbc.co"}],"homepage":"https://github.com/andydbc/pigment#readme","bugs":{"url":"https://github.com/andydbc/pigment/issues"},"bin":{"pigment":"dist/index.js"},"dist":{"shasum":"d16ca28ab4721e7e7af2503f85dc8e1e0dcbcdd5","tarball":"https://registry.npmjs.org/@andbc/pigment/-/pigment-0.0.4.tgz","fileCount":4,"integrity":"sha512-HceUPu+G31lse7sAMR8q9FeFEcK1/WPDBI/C9HVxoxuz0Y2rPK4zo1Zi2NvWsRnuZE35j/SvCV7MRyguyoHryg==","signatures":[{"sig":"MEYCIQD7uwmlmgbu5pmKYvln02JDMaWJgORK+gm9iAFsQt3SdwIhAJVj8Lhspxp7g4sP4f4vrQv+UILgLrAAFJpt2bxIvxpl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12801},"main":"index.js","type":"module","gitHead":"91693b25c819c4e56f17f67df1cf70a6be961129","scripts":{"dev":"tsup --watch","build":"tsup","prepublishOnly":"yarn build"},"_npmUser":{"name":"andbc","email":"a@andbc.co"},"repository":{"url":"git+https://github.com/andydbc/pigment.git","type":"git"},"_npmVersion":"11.8.0","description":"A CLI tool to convert colors between different formats (HEX, RGB, HSL, etc.)","directories":{},"_nodeVersion":"25.6.0","dependencies":{"yargs":"17.7.2","@texel/color":"^1.1.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","@types/node":"^25.0.8","@types/yargs":"^17.0.35"},"_npmOperationalInternal":{"tmp":"tmp/pigment_0.0.4_1776287430128_0.09305861061101206","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@andbc/pigment","version":"0.0.5","publishConfig":{"access":"public"},"description":"A CLI tool to convert colors between different formats (HEX, RGB, HSL, etc.)","type":"module","bin":{"pigment":"dist/index.js"},"main":"index.js","scripts":{"build":"tsup","dev":"tsup --watch","prepublishOnly":"yarn build"},"author":{"name":"Andy Duboc"},"license":"MIT","devDependencies":{"@types/node":"^25.0.8","@types/yargs":"^17.0.35","tsup":"^8.5.1","typescript":"^5.9.3"},"dependencies":{"@texel/color":"^1.1.11","yargs":"17.7.2"},"repository":{"type":"git","url":"git+https://github.com/andydbc/pigment.git"},"gitHead":"43a656bfad1bc670e5a790731bc470e63e0e1c11","_id":"@andbc/pigment@0.0.5","bugs":{"url":"https://github.com/andydbc/pigment/issues"},"homepage":"https://github.com/andydbc/pigment#readme","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-0UMKcBEvcirZfuldSZliHqXsw9HFUuZjXqyki4d2iuvTkTW9UnGQaToIDyKcbPt59jH4+eYGePUGpTLcetdMJw==","shasum":"7677aa910202f02ba18852ce52b3d565121835e6","tarball":"https://registry.npmjs.org/@andbc/pigment/-/pigment-0.0.5.tgz","fileCount":4,"unpackedSize":12922,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHAlN/MIAP3miQPMzdqVhNgK9YF/zHXg4ufTrKrwqEzuAiBOZk7vZSUKyUokRBjtoiiUNl1saQzwDKdk6HAwWxI3hg=="}]},"_npmUser":{"name":"andbc","email":"a@andbc.co"},"directories":{},"maintainers":[{"name":"andbc","email":"a@andbc.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pigment_0.0.5_1776458553597_0.6369776700556642"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T20:52:56.850Z","modified":"2026-04-17T20:42:33.805Z","0.0.2":"2026-04-15T20:52:57.091Z","0.0.3":"2026-04-15T21:05:59.052Z","0.0.4":"2026-04-15T21:10:30.264Z","0.0.5":"2026-04-17T20:42:33.716Z"},"bugs":{"url":"https://github.com/andydbc/pigment/issues"},"author":{"name":"Andy Duboc"},"license":"MIT","homepage":"https://github.com/andydbc/pigment#readme","repository":{"type":"git","url":"git+https://github.com/andydbc/pigment.git"},"description":"A CLI tool to convert colors between different formats (HEX, RGB, HSL, etc.)","maintainers":[{"name":"andbc","email":"a@andbc.co"}],"readme":"# pigment\n\n![banner](./media/banner.png)\n\nCLI tool to convert colors between formats.\n\n## Install\n\n```bash\nnpm install -g @andbc/pigment\n```\n\n## Usage\n\n```bash\npigment <color> --to <format> [--from <format>]\n```\n\n## Supported Formats\n\n| Format   | Example input                        | Example output                           |\n|----------|--------------------------------------|------------------------------------------|\n| `hex`    | `#ff6600` / `#ff660080`              | `#ff6600` / `#ff660080`                  |\n| `rgb`    | `rgb(255, 102, 0)`                 | `rgb(255, 102, 0)`                     |\n| `hsl`    | `hsl(24, 100%, 50%)`               | `hsl(24, 100%, 50%)`                   |\n| `glsl`   | `vec3(1.0, 0.4, 0.0)`                | `vec3(1.000, 0.400, 0.000)`              |\n| `oklch`  | `oklch(65% 0.196 41)`                | `oklch(69.58% 0.2043 43.49)`             |\n| `oklab`  | `oklab(65% 0.1 0.1)`                 | `oklab(65.00% 0.1000 0.1000)`            |\n| `p3`     | `color(display-p3 1 0.4 0)`          | `color(display-p3 1.0000 0.4000 0.0000)` |\n\n**GLSL:** outputs `vec3` when the source has no alpha channel, `vec4` when it does (e.g. 8-digit hex `#rrggbbaa`).\n\n## Examples\n\n```bash\n# Hex to RGB (format auto-detected)\npigment \"#ff6600\" --to rgb\n# rgb(255, 102, 0)\n\n# Hex to OKLCH (format auto-detected)\npigment \"#ff6600\" --to oklch\n# oklch(0.6958 0.2043 43.49)\n\n# 8-digit hex to GLSL vec4 (with alpha, format auto-detected)\npigment \"#ff660080\" --to glsl\n# vec4(1.000, 0.400, 0.000, 0.502)\n\n# RGB to HSL (explicit --from)\npigment \"rgb(255, 102, 0)\" --from rgb --to hsl\n# hsl(24, 100%, 50%)\n\n# OKLCH to Display P3 (explicit --from)\npigment \"oklch(0.65 0.196 41)\" --from oklch --to p3\n# color(display-p3 0.8588 0.3860 0.1713)\n\n# GLSL to hex (explicit --from)\npigment \"vec3(1.0, 0.4, 0.0)\" --from glsl --to hex\n# #ff6600\n```\n\n## Flags\n\n| Flag     | Alias | Description                             |\n|----------|-------|-----------------------------------------|\n| `--from` | `-f`  | Input format (auto-detected if omitted) |\n| `--to`   | `-t`  | Output format (required)                |\n| `--help` | `-h`  | Show help                               |\n\n## Build\n\n```bash\nyarn build\n```\n\nOutputs to `dist/index.js`.\n\n## Credits\n\nColor space conversions by [`@texel/color`](https://github.com/texel-org/color).\n\n## License\n\nMIT, see [LICENSE](https://github.com/andydbc/pigment/blob/main/LICENSE) for details.\n","readmeFilename":"README.md"}