{"id":15406742,"url":"https://github.com/dannyben/icodi","last_synced_at":"2025-10-13T01:32:36.315Z","repository":{"id":33783365,"uuid":"161938488","full_name":"DannyBen/icodi","owner":"DannyBen","description":"Deterministic Random SVG Icon Generator","archived":false,"fork":false,"pushed_at":"2025-08-01T15:30:31.000Z","size":79,"stargazers_count":33,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T01:32:24.618Z","etag":null,"topics":["avatar-generator","avatar-placeholder","gem","identicon","identicon-generator","ruby","svg","svg-generator"],"latest_commit_sha":null,"homepage":"http://icodi.dannyb.co/sandbox","language":"Ruby","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/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-15T19:46:03.000Z","updated_at":"2025-08-01T15:30:35.000Z","dependencies_parsed_at":"2024-07-30T12:32:33.749Z","dependency_job_id":"c823f429-184b-42ea-8515-7dcf1e278657","html_url":"https://github.com/DannyBen/icodi","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":"0.044117647058823484","last_synced_commit":"8bf075832a0eeda0b2588b2c4d8b5dc48b8c9c39"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DannyBen/icodi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ficodi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ficodi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ficodi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ficodi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/icodi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Ficodi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013897,"owners_count":26085326,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["avatar-generator","avatar-placeholder","gem","identicon","identicon-generator","ruby","svg","svg-generator"],"created_at":"2024-10-01T16:25:09.082Z","updated_at":"2025-10-13T01:32:36.310Z","avatar_url":"https://github.com/DannyBen.png","language":"Ruby","readme":"![logo](assets/logo.svg)\n\nIcodi - Deterministic Random SVG Icon Generator\n==================================================\n\nGenerate repeatable random SVG icons from any string, similar to \n[GitHub identicons].\n\nInstallation\n--------------------------------------------------\n\n    $ gem install icodi\n\n\n\nDemo\n--------------------------------------------------\n\nVisit the [Icodi Playground] to experiment with the parameters.\n\n\n\nExamples\n--------------------------------------------------\n\n### Grid: 5x5, Mirror: X (default settings)\n\n![strip1](assets/strip_default.svg)\n\n### Grid: 6x6, Mirror: Y, Stroke: 4\n\n![strip2](assets/strip_mirror_y.svg)\n\n### Grid: 8x8, Stroke: 7, Density: 0.3\n\n![strip3](assets/strip_thick_stroke.svg)\n\n### Grid: 7x7, Mirror: X/Y, Stroke: 3, Density: 0.8\n\n![strip4](assets/strip_mirror_both.svg)\n\n### Grid: 5x5, Jitter: 0.9, Stroke: 2\n\n![strip4](assets/strip_jitter.svg)\n\n### Increasing Stroke: 0.1 - 5.0\n\n![strip5](assets/strip_strokes.svg)\n\n### Increasing Density: 0.3 - 0.8\n\n![strip6](assets/strip_densities.svg)\n\n### Increasing Jitter: 0 - 1.0\n\n![strip6](assets/strip_jitters.svg)\n\n### Mirror Styles: X, Y, Both, None\n\n![strip7](assets/strip_mirrors.svg)\n\n\nUsage\n--------------------------------------------------\n\nThis is the general usage pattern:\n\n```ruby\nrequire 'icodi'\n\n# initialize with optional text and options\nicon = Icodi.new text, options\n\n# get the SVG string\nicon.render\n\n# or save to SVG file\nicon.save 'logo'\n```\n\nGenerate a random icon with the default options, and save it to `icon.svg`:\n\n```ruby\nicon = Icodi.new\nicon.save 'icon'\n```\n\nGenerate persistent random icon (same input generates the same output):\n\n```ruby\nicon = Icodi.new \"any string\"\nicon.save 'icon'\n```\n\nOptions\n--------------------------------------------------\n\nOptions can be provided as the first or second argument:\n\n```ruby\nIcodi.new \"any string\", pixels: 8, density: 0.3\nIcodi.new pixels: 8, density: 0.3, stroke: 2\n```\n\nParameter   | Default    | Type    | Description\n------------|------------|---------|---------------------\n`pixels`    | `5`        | Integer | Grid size.\n`mirror`    | `:x`       | Symbol  | Mirroring mode: `:x`, `:y`, `:both` or `:none`.\n`color`     | Deterministic Random | String | A color string for the pixels.\n`density`   | `0.5`      | Float   | A value between 0 and 1 representing the chance for a pixel to be drawn. Lower values mean less pixels.\n`stroke`    | `0.1`      | Float   | Width of the border around each pixel. Note that each pixel is a 10x10 box, so a stroke of 1 means it will take 10% of the box. Higher values generate more overlap between the pixels.\n`jitter`    | `0`        | Float   | A value between 0 and 1 representing the chance for a pixel to be dislocated by half of its size in a random direction.\n`background`| `#fff`     | String  | A named SVG color string (`blue`, `yellow` etc.) or RGB color (for example `#dddddd`).\n`id`        | `icodi`    | String  | The ID to assign the SVG object. Normally this should not matter, but if you intend to embed this icon in an HTML, or in another SVG, this can be useful.\n`template`  | `:default` | Symbol/String | SVG template to use. Can be `:default`, `:minimal` or a path to a file. Read more on [Victor SVG Templates].\n\n---\n\n\nUsing with Sinatra\n--------------------------------------------------\n\nTo create a Sinatra server that serves Icodi images, see the \n[config.ru](config.ru) example code.\n\n\nContributing / Support\n--------------------------------------------------\n\nIf you experience any issue, have a question or a suggestion, or if you wish\nto contribute, feel free to [open an issue][issues].\n\n---\n\n[GitHub identicons]: https://blog.github.com/2013-08-14-identicons/\n[Victor SVG Templates]: https://victor.dannyb.co/extras/templates/\n[Icodi Playground]: https://icodi.dannyb.co/sandbox\n[issues]: https://github.com/DannyBen/icodi/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Ficodi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Ficodi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Ficodi/lists"}