{"id":16329225,"url":"https://github.com/andrewgjohnson/imageblendedcolorallocate","last_synced_at":"2026-05-10T04:29:17.927Z","repository":{"id":56948010,"uuid":"160992305","full_name":"andrewgjohnson/imageblendedcolorallocate","owner":"andrewgjohnson","description":"imageblendedcolorallocate is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images.","archived":false,"fork":false,"pushed_at":"2024-08-18T18:58:44.000Z","size":1828,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T03:51:57.082Z","etag":null,"topics":["composer","gd","graphics","image","images","php"],"latest_commit_sha":null,"homepage":"https://imageblendedcolorallocate.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-09T01:00:30.000Z","updated_at":"2024-08-18T18:58:47.000Z","dependencies_parsed_at":"2024-08-18T20:10:10.088Z","dependency_job_id":null,"html_url":"https://github.com/andrewgjohnson/imageblendedcolorallocate","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"d1032df753591040934ebeb56ec32c23b9825cb4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andrewgjohnson/imageblendedcolorallocate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimageblendedcolorallocate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimageblendedcolorallocate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimageblendedcolorallocate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimageblendedcolorallocate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewgjohnson","download_url":"https://codeload.github.com/andrewgjohnson/imageblendedcolorallocate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewgjohnson%2Fimageblendedcolorallocate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29006761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T04:25:24.522Z","status":"ssl_error","status_checked_at":"2026-02-02T04:24:51.069Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-10-10T23:14:51.148Z","updated_at":"2026-05-10T04:29:17.920Z","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":"# imageblendedcolorallocate\r\n\r\n[![MIT License](https://img.shields.io/badge/license-MIT-0366d6.png?colorB=0366d6\u0026style=flat-square)](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/LICENSE)\r\n[![Current Release](https://img.shields.io/github/release/andrewgjohnson/imageblendedcolorallocate.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imageblendedcolorallocate/releases)\r\n[![Contributors](https://img.shields.io/github/contributors/andrewgjohnson/imageblendedcolorallocate.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imageblendedcolorallocate/graphs/contributors)\r\n[![Packagist Downloads](https://img.shields.io/packagist/dt/andrewgjohnson/imageblendedcolorallocate.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=packagist)](https://packagist.org/packages/andrewgjohnson/imageblendedcolorallocate/stats)\r\n[![Issues](https://img.shields.io/github/issues/andrewgjohnson/imageblendedcolorallocate.png?colorB=0366d6\u0026style=flat-square\u0026logoColor=white\u0026logo=github)](https://github.com/andrewgjohnson/imageblendedcolorallocate/issues)\r\n[![Patreon](https://imageblendedcolorallocate.agjgd.org/documentation/imageblendedcolorallocate.agjgd.org/images/patreon-badge.png)](https://patreon.com/agjopensource)\r\n\r\n\u003cp align=\"center\"\u003e\u003ca href=\"https://imageblendedcolorallocate.agjgd.org/\" title=\"\"\u003e\u003cimg src=\"https://imageblendedcolorallocate.agjgd.org/documentation/imageblendedcolorallocate.agjgd.org/images/avatar.png\" alt=\"\" title=\"\" width=\"400\" id=\"avatar\" /\u003e\u003c/a\u003e\u003c/p\u003e\r\n\r\n## Description\r\n\r\n**imageblendedcolorallocate** is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images.\r\n\r\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)\r\n\r\n**imageblendedcolorallocate** is an [agjgd](https://agjgd.org) project.\r\n\r\n## Usage\r\n\r\n### With Composer\r\n\r\nThis project offers support for the [Composer](https://getcomposer.org/) dependency manager. You can find the imageblendedcolorallocate package online on [packagist.org](https://packagist.org/packages/andrewgjohnson/imageblendedcolorallocate).\r\n\r\n#### Install using Composer\r\n\r\nEither run this command:\r\n\r\n    composer require andrewgjohnson/imageblendedcolorallocate\r\n\r\nor add this to the `require` section of your composer.json file:\r\n\r\n    \"andrewgjohnson/imageblendedcolorallocate\": \"1.*\"\r\n\r\n### Without Composer\r\n\r\nTo use without Composer add an [include](http://php.net/manual/function.include.php) to the [`imageblendedcolorallocate.php` source file](https://raw.githubusercontent.com/andrewgjohnson/imageblendedcolorallocate/master/source/imageblendedcolorallocate.php).\r\n\r\n    include_once 'source/imageblendedcolorallocate.php';\r\n\r\n## Examples\r\n\r\n    // Allocate red and yellow using the standard method then blend the two to allocate orange\r\n    $red    = imagecolorallocate($im, 0xFF, 0x00, 0x00);\r\n    $yellow = imagecolorallocate($im, 0xFF, 0xFF, 0x00);\r\n    $orange = imageblendedcolorallocate($im, $red, $yellow);\r\n\r\n    // You can also allocate RGBA colors as well as RGB\r\n    $opaqueBlack      = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 0);\r\n    $translucentBlack = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 63);\r\n    $blendedBlack     = imageblendedcolorallocate($im, $opaqueBlack, $translucentBlack);\r\n\r\n    // By default, we allocate with a 50/50 blend where we average the red, blue, green and alpha values for each color but also support alternative blends\r\n    $blue              = imagecolorallocate($im, 0x00, 0x00, 0xFF);\r\n    $cyan              = imagecolorallocate($im, 0x00, 0xFF, 0xFF);\r\n    $blendedMostlyCyan = imageblendedcolorallocate($im, $blue, $cyan, 0.25); // 25% blue, 75% cyan\r\n    $blendedEvenly     = imageblendedcolorallocate($im, $blue, $cyan); // 50% blue, 50% cyan\r\n    $blendedMostlyBlue = imageblendedcolorallocate($im, $blue, $cyan, 0.75); // 75% blue, 25% cyan\r\n\r\nThere are [other examples](https://github.com/andrewgjohnson/imageblendedcolorallocate/tree/master/examples) included in the GitHub repository and on [imageblendedcolorallocate.agjgd.org](https://imageblendedcolorallocate.agjgd.org/examples/).\r\n\r\n## Help Requests\r\n\r\nPlease post any questions in the [discussions area](https://github.com/andrewgjohnson/imageblendedcolorallocate/discussions) on GitHub if you need help.\r\n\r\nIf you discover a bug please [enter an issue](https://github.com/andrewgjohnson/imageblendedcolorallocate/issues/new) on GitHub. When submitting an issue please use our [issue template](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/ISSUE_TEMPLATE.md).\r\n\r\n## Contributing\r\n\r\nPlease read our [contributing guidelines](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/.github/CONTRIBUTING.md) if you want to contribute.\r\n\r\nYou can contribute financially by becoming a [patron](https://patreon.com/agjopensource) at [patreon.com/agjopensource](https://patreon.com/agjopensource) to support imageblendedcolorallocate and [other agjgd.org projects](https://agjgd.org/projects/).\r\n\r\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)\r\n\r\n## Acknowledgements\r\n\r\nThis project was started by [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson).\r\n\r\nFull list of contributors:\r\n * [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson)\r\n\r\nOur [security policies and procedures](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/.github/SECURITY.md) comes via the [atomist/samples](https://github.com/atomist/samples/blob/master/SECURITY.md) project. Our [issue templates](https://github.com/andrewgjohnson/imageblendedcolorallocate/tree/master/.github/ISSUE_TEMPLATE) comes via the [tensorflow/tensorflow](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) project. Our [pull request template](https://github.com/andrewgjohnson/imageblendedcolorallocate/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).\r\n\r\n## Changelog\r\n\r\nYou can find all notable changes in the [changelog](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/CHANGELOG.md).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewgjohnson%2Fimageblendedcolorallocate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewgjohnson%2Fimageblendedcolorallocate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewgjohnson%2Fimageblendedcolorallocate/lists"}