{"id":21003904,"url":"https://github.com/czebe/node-swatch-names","last_synced_at":"2026-04-25T15:33:20.899Z","repository":{"id":143899445,"uuid":"107149219","full_name":"czebe/node-swatch-names","owner":"czebe","description":"Swatch-names","archived":false,"fork":false,"pushed_at":"2017-11-21T10:40:13.000Z","size":721,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T12:03:42.599Z","etag":null,"topics":["aco","color","generate","name","photoshop","swatch"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/czebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-16T15:48:35.000Z","updated_at":"2019-02-04T14:41:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f2a4ff2-2c96-4b13-9fe1-6a482dc047c3","html_url":"https://github.com/czebe/node-swatch-names","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czebe%2Fnode-swatch-names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czebe%2Fnode-swatch-names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czebe%2Fnode-swatch-names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czebe%2Fnode-swatch-names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czebe","download_url":"https://codeload.github.com/czebe/node-swatch-names/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419127,"owners_count":20287806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aco","color","generate","name","photoshop","swatch"],"created_at":"2024-11-19T08:28:53.774Z","updated_at":"2025-12-28T15:23:48.467Z","avatar_url":"https://github.com/czebe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg align=\"right\" src=\"https://user-images.githubusercontent.com/2728671/32230886-6946c520-be54-11e7-9cf3-8e33a35cb20d.png\" width=\"200\" height=\"269\" /\u003e\n\n# Swatch-names\n\n[![GitHub release](https://img.shields.io/github/release/czebe/node-swatch-names.svg)](https://github.com/czebe/node-swatch-names)\n\n**A node tool to save the hassle of naming each color in your project manually.**\n\nSwatch-names automatically and consistently names Photoshop color swatches to be shared among frontend developers and designers. Exports colors to SASS and JS variables for use in code.\nThe tool reads standard **Photoshop .aco swatch files** finds a unique color name for every swatch entry and saves the resulting color palette as an **.aco** file. This file can be loaded into Photoshop's Swatches so developers and designers use the same color names.\n\n## Before/after\n\n\u003cimg align=\"left\" src=\"https://user-images.githubusercontent.com/2728671/32318309-2b6660da-bfb7-11e7-90be-7b1665fcc434.png\" /\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/2728671/32318310-2b846742-bfb7-11e7-9e1d-f9340d5daafd.png\" /\u003e\n\n## Exported variables\n\nYou can generate all colors as SASS variables:\n\n```scss\n// File auto generated by 'swatch-names'. Do not modify this file directly.\n$turquoise-sea: '#59CFF1';\n$pattens-blue: '#D2E7EF';\n$smoky-blue: '#6F97A8';\n$outback: '#C6A376';\n$ambrosia-salad: '#F4DCD3';\n$sunlight: '#ECD7A0';\n$pale-prim: '#FBF6A2';\n$light-hot-pink: '#FCABDE';\n```\n\nThe generated JS looks like this:\n\n```javascript\n// File auto generated by 'swatch-names'. Do not modify this file directly.\nexport default {\n  turquoise_sea: '#59CFF1',\n  pattens_blue: '#D2E7EF',\n  smoky_blue: '#6F97A8',\n  outback: '#C6A376',\n  ambrosia_salad: '#F4DCD3',\n  sunlight: '#ECD7A0',\n  pale_prim: '#FBF6A2',\n  light_hot_pink: '#FCABDE',\n};\n```\n\n## Install\n\n```sh\n$ npm install node-swatch-names --save-dev\n```\n\n## Usage: CLI\n\nStart the CLI and progress step-by-step with swatch conversion or setup:\n\n```sh\n$ ./node_modules/.bin/swatch-names\n```\n\nSpecify a swatch file and an output for the result:\n\n```sh\n$ ./node_modules/.bin/swatch-names --swatch path/to/swatch.aco --output path/to/result.aco\n```\n\nSpecify a swatch file, an output and SCSS/JS file to be generated. This is especially useful for **watch scripts** (use `npm-watch` or `nodemon`).\n\n```sh\n$ ./node_modules/.bin/swatch-names --swatch swatch.aco --output result.aco --scss colors.scss --js colors.js\n```\n\nTo convert and process multiple swatch files, simply supply multiple arguments:\n\n```sh\n$ ./node_modules/.bin/swatch-names --swatch swatch1.aco --swatch swatch2.aco --scss colors.scss --js colors.js\n```\n\n## Usage: node\n\nYou can utilize getColorNames() to generate color names for any hex input. Or use encode() to generate a Photoshop Swatch file in node.\n\n ```javascript\nimport {getColorNames} from 'node-swatch-names';\n\nconst colors = getColorNames(['#59CFF1', '#D2E7EF', '#6F97A8', '#C6A376']);\n\nconsole.log(color[0]);\n// {name: \"turquoise-sea\", hex: \"#59CFF1\"}\n ```\n\n## Acknowledgements\n\nThis tool was inspired by the following great projects:\n\n- The ACO file format description: http://www.nomodes.com/aco.html\n- [David LeMieux](https://github.com/lemieuxster)'s excellent aco writer tool: [node-aco](https://github.com/lemieuxster/node-aco)\n- [Alvaro Pinot](https://github.com/alvaropinot)'s aco reader tool: [aco-reader](https://github.com/alvaropinot/aco-reader)\n- [David Aerne](https://github.com/meodai)'s huge collection of color names: [color-names](https://github.com/meodai/color-names)\n\n\n## Contributing\n\nPRs are much appreciated!\n\nUse `npm run develop` while coding and `npm test` to run unit tests.\n\n## License\n\nMIT \u0026copy; [Marton Czebe](https://github.com/czebe)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczebe%2Fnode-swatch-names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczebe%2Fnode-swatch-names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczebe%2Fnode-swatch-names/lists"}