{"id":15612360,"url":"https://github.com/kylefox/placeholder-pics","last_synced_at":"2025-04-28T12:55:59.219Z","repository":{"id":49893948,"uuid":"51180041","full_name":"kylefox/placeholder-pics","owner":"kylefox","description":"Use Python to easily generate placeholder pictures for your users.","archived":false,"fork":false,"pushed_at":"2021-06-08T19:09:27.000Z","size":78,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T01:37:45.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylefox.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}},"created_at":"2016-02-05T23:11:38.000Z","updated_at":"2022-09-04T11:01:44.000Z","dependencies_parsed_at":"2022-08-29T06:51:24.340Z","dependency_job_id":null,"html_url":"https://github.com/kylefox/placeholder-pics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fplaceholder-pics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fplaceholder-pics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fplaceholder-pics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylefox%2Fplaceholder-pics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylefox","download_url":"https://codeload.github.com/kylefox/placeholder-pics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242478375,"owners_count":20134966,"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-10-03T06:41:58.284Z","updated_at":"2025-03-07T23:30:35.677Z","avatar_url":"https://github.com/kylefox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](http://drops.kylefox.ca/114za+)\n\n# Placeholder Pics\n\nEasily generate placeholder pictures for your users.\n\nIt's really good at rendering one or two letters inside a colored square, and terrible at everything else.\n\n# Install\n\nIf you guessed pip, you are totally correct!\n\n`pip install placeholder-pics`\n\n# Basic Use\n\n```python\nfrom placeholder_pics import PlaceholderPic\n\nplaceholder = PlaceholderPic('KF')\nplaceholder.image.save('KF.png')\n```\n\nThe `image` property is an instance of [`PIL.Image.Image`](http://pillow.readthedocs.org/en/3.0.x/reference/Image.html#the-image-class). This means you can save it however you like, or even apply additional manipulations. You could rotate it, for example, which would be kind of silly. Don't do that!\n\n# Parameters\n\nThe only required parameter to `Placeholder` is the text you want to render.\n\nThe following optional parameters are accepted.\n\n| Parameter  | Default | Description |\n| ------------- | ------------- | ------------- |\n| `size` | `300` | Image dimensions (always square) |\n| `foreground` | `\"#ffffff\"` | Text color (hex format, _with_ leading #) |\n| `background` | `None` | Background color (hex format, _with_ leading #). If `None`, our algorithm (`random.choice`) will choose a nice [Material Design](https://www.google.com/design/spec/style/color.html#color-color-palette) color for you, no sweat. Pass `\"random\"` to generate a _totally_ random color. |\n| `font_file` | `\"SourceSansPro-Regular.ttf\"` | File name of the font you'd like to use. [Source Sans Regular](https://www.google.com/fonts/specimen/Source+Sans+Pro) is included by default. See [`PIL.ImageFont`](http://pillow.readthedocs.org/en/3.0.x/reference/ImageFont.html) for more info on how fonts are loaded. |\n| `font_size` | `None` | Font size, in points. If `None`, will default to `size/2`, which seems to be a decent proportion. |\n\n# Are you SO mad because of bugs or missing features?!?!\n\n![](https://camo.githubusercontent.com/df781f87da2f2db87b5cc3125d5459bc70812112/687474703a2f2f64726f70732e6b796c65666f782e63612f31637147502b)\n\nJust kidding, you know what to do. [Submit an issue.](https://github.com/kylefox/placeholder-pics/issues)\n\n# Font Credits\n\n[Source Sans Pro](https://www.google.com/fonts/specimen/Source+Sans+Pro) was designed by [Paul D. Hunt](https://plus.google.com/108888178732927400671/about) and is distributed under the [SIL Open Font License, 1.1.](http://scripts.sil.org/OFL)\n\n# License (MIT)\n\nPlaceholder Pics is distributed under the MIT License.\nLearn more at http://opensource.org/licenses/mit-license.php\n\nCopyright (c) 2016 Kyle Fox\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fplaceholder-pics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylefox%2Fplaceholder-pics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylefox%2Fplaceholder-pics/lists"}