{"id":15046087,"url":"https://github.com/andrewgjohnson/imagecolorallocatefromstring","last_synced_at":"2026-05-15T00:15:44.406Z","repository":{"id":62485875,"uuid":"160990134","full_name":"andrewgjohnson/imagecolorallocatefromstring","owner":"andrewgjohnson","description":"imagecolorallocatefromstring is a function that will allocate a color based on a string for your PHP GD images.","archived":false,"fork":false,"pushed_at":"2024-08-18T18:59:53.000Z","size":1805,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T21:55:43.939Z","etag":null,"topics":["composer","gd","graphics","image","images","php"],"latest_commit_sha":null,"homepage":"https://imagecolorallocatefromstring.agjgd.org","language":"PHP","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/andrewgjohnson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"andrewgjohnson","patreon":"agjgd"}},"created_at":"2018-12-09T00:15:48.000Z","updated_at":"2024-08-18T18:59:56.000Z","dependencies_parsed_at":"2024-08-18T20:10:59.408Z","dependency_job_id":null,"html_url":"https://github.com/andrewgjohnson/imagecolorallocatefromstring","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andrewgjohnson/imagecolorallocatefromstring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimagecolorallocatefromstring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimagecolorallocatefromstring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimagecolorallocatefromstring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimagecolorallocatefromstring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewgjohnson","download_url":"https://codeload.github.com/andrewgjohnson/imagecolorallocatefromstring/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimagecolorallocatefromstring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: 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":["composer","gd","graphics","image","images","php"],"created_at":"2024-09-24T20:52:41.432Z","updated_at":"2026-05-15T00:15:44.386Z","avatar_url":"https://github.com/andrewgjohnson.png","language":"PHP","funding_links":["https://github.com/sponsors/andrewgjohnson","https://patreon.com/agjgd","https://patreon.com/agjopensource"],"categories":[],"sub_categories":[],"readme":"# imagecolorallocatefromstring\n\n[![MIT License](https://img.shields.io/badge/license-MIT-0366d6.png?colorB=0366d6\u0026style=flat-square)](https://github.com/andrewgjohnson/imagecolorallocatefromstring/blob/master/LICENSE)\n[![Current Release](https://img.shields.io/github/release/andrewgjohnson/imagecolorallocatefromstring.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imagecolorallocatefromstring/releases)\n[![Contributors](https://img.shields.io/github/contributors/andrewgjohnson/imagecolorallocatefromstring.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imagecolorallocatefromstring/graphs/contributors)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/andrewgjohnson/imagecolorallocatefromstring.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=packagist)](https://packagist.org/packages/andrewgjohnson/imagecolorallocatefromstring/stats)\n[![Issues](https://img.shields.io/github/issues/andrewgjohnson/imagecolorallocatefromstring.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imagecolorallocatefromstring/issues)\n[![Patreon](https://imagecolorallocatefromstring.agjgd.org/documentation/imagecolorallocatefromstring.agjgd.org/images/patreon-badge.png)](https://patreon.com/agjopensource)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://imagecolorallocatefromstring.agjgd.org/\" title=\"\"\u003e\u003cimg src=\"https://imagecolorallocatefromstring.agjgd.org/documentation/imagecolorallocatefromstring.agjgd.org/images/avatar.png\" alt=\"\" title=\"\" width=\"400\" id=\"avatar\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\n## Description\n\n**imagecolorallocatefromstring** is a function that will allocate a color based on a string for your PHP GD images.\n\n[![Patreon - Become a Patron](https://raster.shields.io/badge/Patreon%20-become%20a%20Patron-FD334A.png?style=for-the-badge\u0026logo=patreon\u0026logoColor=FD334A)](https://patreon.com/agjopensource)\n\n**imagecolorallocatefromstring** is an [agjgd](https://agjgd.org) project.\n\n## Usage\n\n### With Composer\n\nThis project offers support for the [Composer](https://getcomposer.org/) dependency manager. You can find the imagecolorallocatefromstring package online on [packagist.org](https://packagist.org/packages/andrewgjohnson/imagecolorallocatefromstring).\n\n#### Install using Composer\n\nEither run this command:\n\n    composer require andrewgjohnson/imagecolorallocatefromstring\n\nor add this to the `require` section of your composer.json file:\n\n    \"andrewgjohnson/imagecolorallocatefromstring\": \"1.*\"\n\n### Without Composer\n\nTo use without Composer add an [include](https://www.php.net/manual/en/function.include.php) to the [`imagecolorallocatefromstring.php` source file](https://raw.githubusercontent.com/andrewgjohnson/imagecolorallocatefromstring/master/source/imagecolorallocatefromstring.php).\n\n    include_once 'source/imagecolorallocatefromstring.php';\n\n## Examples\n\n    // Allocate red with imagecolorallocate() or with imagecolorallocatefromstring() via a string\n    $red           = imagecolorallocate($im, 0xFF, 0x00, 0x00);\n    $redFromString = imagecolorallocatefromstring($im, '#FF0000');\n    $redFromString = imagecolorallocatefromstring($im, '#f00');\n    $redFromString = imagecolorallocatefromstring($im, 'rgb(255 0 0)');\n    $redFromString = imagecolorallocatefromstring($im, 'rgb(255, 0, 0)');\n    $redFromString = imagecolorallocatefromstring($im, 'rgba(255, 0, 0, 1)');\n    $redFromString = imagecolorallocatefromstring($im, 'rgba(255 0 0 / 100%)');\n    $redFromString = imagecolorallocatefromstring($im, 'red');\n\nThere are [other examples](https://github.com/andrewgjohnson/imagecolorallocatefromstring/tree/master/examples) included in the GitHub repository and on [imagecolorallocatefromstring.agjgd.org](https://imagecolorallocatefromstring.agjgd.org/examples/).\n\n## Help Requests\n\nPlease post any questions in the [discussions area](https://github.com/andrewgjohnson/imagecolorallocatefromstring/discussions) on GitHub if you need help.\n\nIf you discover a bug please [enter an issue](https://github.com/andrewgjohnson/imagecolorallocatefromstring/issues/new) on GitHub. When submitting an issue please use our [issue templates](https://github.com/andrewgjohnson/imagecolorallocatefromstring/tree/master/.github/ISSUE_TEMPLATE).\n\n## Contributing\n\nPlease read our [contributing guidelines](https://github.com/andrewgjohnson/imagecolorallocatefromstring/blob/master/.github/CONTRIBUTING.md) if you want to contribute.\n\nYou can contribute financially by becoming a [patron](https://patreon.com/agjopensource) at [patreon.com/agjopensource](https://patreon.com/agjopensource) to support imagecolorallocatefromstring and [other agjgd.org projects](https://agjgd.org/projects/).\n\n[![Patreon - Become a Patron](https://raster.shields.io/badge/Patreon%20-become%20a%20Patron-FD334A.png?style=for-the-badge\u0026logo=patreon\u0026logoColor=FD334A)](https://patreon.com/agjopensource)\n\n## Acknowledgements\n\nThis project was started by [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson).\n\nFull list of contributors:\n * [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson)\n\nOur [security policies and procedures](https://github.com/andrewgjohnson/imagecolorallocatefromstring/blob/master/.github/SECURITY.md) come via the [atomist/samples](https://github.com/atomist/samples/blob/master/SECURITY.md) project. Our [issue templates](https://github.com/andrewgjohnson/imagecolorallocatefromstring/tree/master/.github/ISSUE_TEMPLATE) come via the [tensorflow/tensorflow](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) project. Our [pull request template](https://github.com/andrewgjohnson/imagecolorallocatefromstring/blob/master/.github/PULL_REQUEST_TEMPLATE.md) comes via the [stevemao/github-issue-templates](https://github.com/stevemao/github-issue-templates) project. The [mountains photo](https://unsplash.com/photos/qJvpykJ5SKs) comes via [Gabriel Garcia Marengo](https://unsplash.com/@gabrielgm).\n\n## Changelog\n\nYou can find all notable changes in the [changelog](https://github.com/andrewgjohnson/imagecolorallocatefromstring/blob/master/CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewgjohnson%2Fimagecolorallocatefromstring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewgjohnson%2Fimagecolorallocatefromstring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewgjohnson%2Fimagecolorallocatefromstring/lists"}