{"id":13311719,"url":"https://github.com/nkoepke/Identicon","last_synced_at":"2025-03-10T17:30:42.630Z","repository":{"id":170922803,"uuid":"611290991","full_name":"nkoepke/Identicon","owner":"nkoepke","description":"JavaScript variant of GitHub Identicons","archived":false,"fork":false,"pushed_at":"2024-08-24T10:01:23.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-24T11:21:38.769Z","etag":null,"topics":["identicon","identicon-avatar","identicon-generator","identicon-github","identicon-library","identicon-svgs","identicons","javascript","js","profile","profile-image","profile-picture","svg"],"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/nkoepke.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-03-08T14:21:54.000Z","updated_at":"2024-08-24T11:21:39.895Z","dependencies_parsed_at":null,"dependency_job_id":"0de94c67-7814-4c19-80a6-638d20d16693","html_url":"https://github.com/nkoepke/Identicon","commit_stats":null,"previous_names":["nkoepke/identicon"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkoepke%2FIdenticon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkoepke%2FIdenticon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkoepke%2FIdenticon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkoepke%2FIdenticon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkoepke","download_url":"https://codeload.github.com/nkoepke/Identicon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242892571,"owners_count":20202558,"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":["identicon","identicon-avatar","identicon-generator","identicon-github","identicon-library","identicon-svgs","identicons","javascript","js","profile","profile-image","profile-picture","svg"],"created_at":"2024-07-29T18:02:21.773Z","updated_at":"2025-03-10T17:30:42.617Z","avatar_url":"https://github.com/nkoepke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Identicon](https://github.com/nkoepke/Identicon/blob/main/images/Identicon.png?raw=true)\n\n# Identicon\nJavaScript variant of GitHub Identicons\n\n[![GitHub latest commit](https://badgen.net/github/last-commit/nkoepke/Identicon/main)](https://GitHub.com/nkoepke/Identicon/commit/)\n[![made-with-javascript](https://img.shields.io/badge/Made%20with-JavaScript-1f425f.svg?logo=javascript)](https://www.javascript.com)\n\n## Identicon class\n\nclass `Identicon` (options [optional] `object`)\n\n### Options (Constructor)\n\n* color `string` [optional]\n\n* backgroundColor `string` [optional]\n\n* seed `string` [optional] (String of any length to set a specific color for `color`. For example the seed \"Test\" will always set the color to green.)\n\nYou don't have to set the colors in the constructor. You can always change them by setting the attributes after the initialization of the object.\n\n### Attributes\n\n* `grid`\n    * Internal representation of the icon as a two dimensional array.\n\n* `color`\n    * Color of the icon as a css color. Default `green`.\n\n* `backgroundColor`\n    * Color of the icon as a css color. Default `transparent`.\n\n### Methods\n\n* `render()`\n    * Icon as SVG string.\n\n* `randomize()`\n    * Sets new random pattern to `grid`. Returns the `render()` Method.\n\n## Example\n\n```js\nconst Identicon = require('./src/identicon.js');\nlet image = new Identicon({color: \"purple\", backgroundColor: \"white\"});\nconsole.log(image.render());\n```\n\nFor web browser usage, use as commonJS module or remove ```module.exports = Identicon;``` from the JS file and use it like a regular class.\nThen use\n```js\nlet image = new Identicon();\nconsole.log(image.render());\n\n// Set new color and new random image\nimage.color = \"#e61c1c\";\nicon.randomize();\nconsole.log(image.render());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkoepke%2FIdenticon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkoepke%2FIdenticon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkoepke%2FIdenticon/lists"}