{"id":14990181,"url":"https://github.com/9am/img-halftone","last_synced_at":"2026-02-26T18:36:34.218Z","repository":{"id":185545895,"uuid":"673731865","full_name":"9am/img-halftone","owner":"9am","description":"A web component turns \u003cimg\u003e into halftone 🥑","archived":false,"fork":false,"pushed_at":"2023-08-14T08:35:22.000Z","size":24,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T10:11:25.200Z","etag":null,"topics":["canvas","cmyk","custom-element","halftone","img","webcomponent"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/9am.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-02T09:46:43.000Z","updated_at":"2025-02-09T05:51:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"29df88e3-3fbe-4061-9252-413c42aa0541","html_url":"https://github.com/9am/img-halftone","commit_stats":null,"previous_names":["9am/img-halftone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/9am/img-halftone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9am%2Fimg-halftone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9am%2Fimg-halftone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9am%2Fimg-halftone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9am%2Fimg-halftone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9am","download_url":"https://codeload.github.com/9am/img-halftone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9am%2Fimg-halftone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29867561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T18:27:06.972Z","status":"ssl_error","status_checked_at":"2026-02-26T18:26:57.848Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["canvas","cmyk","custom-element","halftone","img","webcomponent"],"created_at":"2024-09-24T14:19:40.080Z","updated_at":"2026-02-26T18:36:34.199Z","avatar_url":"https://github.com/9am.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"https://github.com/9am/9am.github.io/assets/1435457/3310c374-8cd7-4c2b-ad68-c349ede61598\" alt=\"img-tissue\" width=\"180\" height=\"180\" /\u003e\n\t\u003ch1\u003e\u0026lt;img-halftone\u0026gt;\u003c/h1\u003e\n\t\u003cp\u003eA web component turns \u0026lt;img\u0026gt; into halftone.🥑\u003c/p\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://github.com/9am/img-halftone/blob/main/LICENSE\"\u003e\n            \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/9am/img-halftone?style=flat-square\u0026color=success\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://www.npmjs.com/package/@9am/img-halftone\"\u003e\n            \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@9am/img-halftone?style=flat-square\u0026color=orange\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://www.npmjs.com/package/@9am/img-halftone\"\u003e\n            \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dt/@9am/img-halftone?style=flat-square\u0026color=blue\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://bundlephobia.com/package/@9am/img-halftone@latest\"\u003e\n            \u003cimg alt=\"npm bundle size\" src=\"https://img.shields.io/bundlephobia/minzip/@9am/img-halftone?style=flat-square\"\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n- 🎨 Print halftone image with **CMYK**.\n- ⚙️  Halftone is performed in **web worker**.\n- 📜 Render with **Canvas** or **HTML element**.\n- 🧩 Various **dot shapes** supported.\n- 🔖 **Alt** support for **Accessibility**.\n- 🛎 A **loading** className on the host.\n- 💽 **≈ 3kB** minzipped.\n\n## Demo\n\n|Description|Live demo|\n|:---------:|:-------:|\n|Default setting with a zoom-in-out animation|[**codepen**](https://codepen.io/9am/pen/jOQdrmX)|\n|Render with different `varient`|[**codepen**](https://codepen.io/9am/pen/vYQbaRJ)|\n|Render with different `cellsize`|[**codepen**](https://codepen.io/9am/pen/OJadweB)|\n|Render with different `shape`|[**codepen**](https://codepen.io/9am/pen/YzRBOKY)|\n|Concurrent processing|[**codepen**](https://codepen.io/9am/pen/XWyOBjL)|\n\n\n## Usage\n\n#### Install\n\n```sh\nnpm install @9am/img-halftone\n```\n\n```js\nimport '@9am/img-halftone'\n```\n\n#### Or use a CDN link\n\n```html\n\u003cscript type=\"module\" src=\"https://cdn.skypack.dev/@9am/img-halftone\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003cscript src=\"https://www.unpkg.com/@9am/img-halftone\"\u003e\u003c/script\u003e\n```\n\n#### HTML\n\n```html\n\u003cimg-halftone src=\"img.png\"\u003e\u003c/img-halftone\u003e\n```\n\n## Documentation\n\n### \u0026lt;img-halftone\u0026gt; attributes\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|`src`|{string}|**Required**|The image URL|\n|`alt`|{string}|img-halftone|The alternative text description|\n|`varient`|{canvas \\| grid}|canvas|The Render type \u003c/br\u003e *(Notice: using 'grid' with small cellsize will cause layout performance problem.)*|\n|`cellsize`|{number}|4|The cell size for each dot in pixel|\n|`shape`|{circle \\| triangle \\| rectangle \\| hexagon }|circle|The shape of dots|\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9am%2Fimg-halftone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9am%2Fimg-halftone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9am%2Fimg-halftone/lists"}