{"id":18352388,"url":"https://github.com/limpix31/randpix","last_synced_at":"2025-04-06T11:32:49.741Z","repository":{"id":42467764,"uuid":"477634731","full_name":"LIMPIX31/randpix","owner":"LIMPIX31","description":"Fastest pixel avatar generator","archived":false,"fork":false,"pushed_at":"2022-08-15T22:25:40.000Z","size":64,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T22:22:30.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LIMPIX31.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}},"created_at":"2022-04-04T09:36:40.000Z","updated_at":"2024-02-25T11:21:37.000Z","dependencies_parsed_at":"2022-09-14T00:10:49.780Z","dependency_job_id":null,"html_url":"https://github.com/LIMPIX31/randpix","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Frandpix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Frandpix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Frandpix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIMPIX31%2Frandpix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIMPIX31","download_url":"https://codeload.github.com/LIMPIX31/randpix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478152,"owners_count":20945258,"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":[],"created_at":"2024-11-05T21:35:49.374Z","updated_at":"2025-04-06T11:32:49.269Z","avatar_url":"https://github.com/LIMPIX31.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fastest random pixel avatar generator\n\n- **~8000 pixel arts per second**\n- **Many color schemes**\n- **Very simple**\n- **Browser support**\n\n[Live demo](https://randpix-demo.vercel.app/)\n\n\u003cimg alt='preview' width=\"512\" height=\"512\" src=\"https://i.imgur.com/rN8SQC1.png\"\u003e\n\n## Installing Canvas for Randpix\n| OS      | Command                                                                                                  |\n|---------|----------------------------------------------------------------------------------------------------------|\n| OS X    | Using [Homebrew](https://brew.sh/):\u003cbr/\u003e`brew install pkg-config cairo pango libpng jpeg giflib librsvg` |\n| Ubuntu  | `sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev` |\n| Fedora  | `sudo yum install gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel`                      |\n| Solaris | `pkgin install cairo pango pkg-config xproto renderproto kbproto xextproto`                              |\n| OpenBSD | `doas pkg_add cairo pango png jpeg giflib`                                                               |\n| Windows | See the [wiki](https://github.com/Automattic/node-canvas/wiki/Installation:-Windows)                     |\n| Others  | See the [wiki](https://github.com/Automattic/node-canvas/wiki)                                           |\n\n## Example\n\n```ts\nimport { randpix, RandpixColorScheme, Symmetry } from 'randpix'\n\nconst generate = randpix({\n  colorScheme: RandpixColorScheme.DARKULA, // Color theme (default: NEUTRAL)\n  size: 8, // Art size. Recommended 7 or 8 (odd/even symmetry) (default: 8)\n  scale: 32, // Pixel scale (default: 1)\n  symmetry: Symmetry.VERTICAL, // Symmetry (default: VERTICAL)\n  color: [255, 100, 50], // [R, G, B] like color for solid art (default: undefined),\n  seed: 'Some string', // Seed (default: undefined)\n  colorBias: 15, // Slightly changes the color hue, which adds more color to the image (default: undefined)\n  grayscaleBias: false // Change only the brightness of the color instead of the hue (default: undefined)\n})\n\nconst art = generate() // Generating the pixel art\n\nconst pngBuffer = art.toBuffer('image/png')\nconst dataURL = art.toDataURL()\n```\n\n## Custom color scheme\n\n```ts\nconst customColorScheme = [\n  // [R, G, B, C], C is the frequency of this color appearing in the pixel art\n  [151, 219, 174, 1],\n  [195, 229, 174, 0.5],\n  [241, 225, 166, 0.5],\n  [244, 187, 187, 0.2],\n]\n```\n\n## My Benchmarks\n```\nWith defaults: 0.11812 ms/art. Speed: 8465 arts/s\nWith scale 32: 0.14147 ms/art. Speed: 7068 arts/s\nWith bias 15: 0.11686 ms/art. Speed: 8557 arts/s\nWith full fill: 0.21214 ms/art. Speed: 4713 arts/s\nWith quarter fill: 0.06061 ms/art. Speed: 16497 arts/s\nWith quad symmetry: 0.11023 ms/art. Speed: 9072 arts/s\nWith solid color: 0.10263 ms/art. Speed: 9744 arts/s\nEvery instanced: 0.15031 ms/art. Speed: 6652 arts/s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpix31%2Frandpix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimpix31%2Frandpix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpix31%2Frandpix/lists"}