PHPackages                             andrewgjohnson/imageblendedcolorallocate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. andrewgjohnson/imageblendedcolorallocate

ActiveLibrary[Image &amp; Media](/categories/media)

andrewgjohnson/imageblendedcolorallocate
========================================

imageblendedcolorallocate is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images

v1.1.1(3d ago)143[1 issues](https://github.com/andrewgjohnson/imageblendedcolorallocate/issues)2MITPHPPHP &gt;=5.0.0

Since Dec 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andrewgjohnson/imageblendedcolorallocate)[ Packagist](https://packagist.org/packages/andrewgjohnson/imageblendedcolorallocate)[ Docs](https://imageblendedcolorallocate.agjgd.org)[ GitHub Sponsors](https://github.com/andrewgjohnson)[ Patreon](https://www.patreon.com/agjopensource)[ RSS](/packages/andrewgjohnson-imageblendedcolorallocate/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (4)Versions (7)Used By (2)

imageblendedcolorallocate
=========================

[](#imageblendedcolorallocate)

[![MIT License](https://camo.githubusercontent.com/04922227901ae9b0742e739b586a385fdacbb439766ee50870ea8db097378794/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3033363664362e706e673f636f6c6f72423d303336366436267374796c653d666c61742d737175617265)](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/LICENSE)[![Current Release](https://camo.githubusercontent.com/192d15aab18eb21fb23f0a463d6b380ff8de30b19f40e5685b15f27b8e84e5bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616e64726577676a6f686e736f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e706e673f636f6c6f72423d303336366436267374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562)](https://github.com/andrewgjohnson/imageblendedcolorallocate/releases)[![Contributors](https://camo.githubusercontent.com/679e24cbea14e32aabfcbd7c03590e9bfa0d0c913f5f6f2dfdb0dd749dd9de3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f616e64726577676a6f686e736f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e706e673f636f6c6f72423d303336366436267374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562)](https://github.com/andrewgjohnson/imageblendedcolorallocate/graphs/contributors)[![Packagist Downloads](https://camo.githubusercontent.com/4b604414144e5ce410028ba6d87f81fb717d6d6ce13762dfc1f00e7aaba20776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e64726577676a6f686e736f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e706e673f636f6c6f72423d303336366436267374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d7061636b6167697374)](https://packagist.org/packages/andrewgjohnson/imageblendedcolorallocate/stats)[![Issues](https://camo.githubusercontent.com/f42d2075bec248f9185f5c39ad1e6d4088fae5c59df69a8a53dc9edc4709b356/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f616e64726577676a6f686e736f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e706e673f636f6c6f72423d303336366436267374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562)](https://github.com/andrewgjohnson/imageblendedcolorallocate/issues)[![Patreon](https://camo.githubusercontent.com/e160379367ab966e4c94d9c1dcc7cb2e4659c3fcd946d2dbf9e4fa7806801bc5/68747470733a2f2f696d616765626c656e646564636f6c6f72616c6c6f636174652e61676a67642e6f72672f646f63756d656e746174696f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e61676a67642e6f72672f696d616765732f70617472656f6e2d62616467652e706e67)](https://patreon.com/agjopensource)

[![](https://camo.githubusercontent.com/a34fc7804069fc3ae8be2a3b671220e36da7e4cb25935f05ddaa92948c7def53/68747470733a2f2f696d616765626c656e646564636f6c6f72616c6c6f636174652e61676a67642e6f72672f646f63756d656e746174696f6e2f696d616765626c656e646564636f6c6f72616c6c6f636174652e61676a67642e6f72672f696d616765732f6176617461722e706e67)](https://imageblendedcolorallocate.agjgd.org/)

Description
-----------

[](#description)

**imageblendedcolorallocate** is a function that will allocate a new blended color based on two existing allocated colors for your PHP GD images.

[![Patreon - Become a Patron](https://camo.githubusercontent.com/24c60c4550632628010d5c53c8cf9abc46d101caea3a76f057bff8884850c3b5/68747470733a2f2f7261737465722e736869656c64732e696f2f62616467652f50617472656f6e2532302d6265636f6d6525323061253230506174726f6e2d4644333334412e706e673f7374796c653d666f722d7468652d6261646765266c6f676f3d70617472656f6e266c6f676f436f6c6f723d464433333441)](https://patreon.com/agjopensource)

**imageblendedcolorallocate** is an [agjgd](https://agjgd.org) project.

Usage
-----

[](#usage)

### With Composer

[](#with-composer)

This 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).

#### Install using Composer

[](#install-using-composer)

Either run this command:

```
composer require andrewgjohnson/imageblendedcolorallocate

```

or add this to the `require` section of your composer.json file:

```
"andrewgjohnson/imageblendedcolorallocate": "1.*"

```

### Without Composer

[](#without-composer)

To 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).

```
include_once 'source/imageblendedcolorallocate.php';

```

Examples
--------

[](#examples)

```
// standard method to allocate a color for an image
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
$yellow = imagecolorallocate($im, 0xFF, 0xFF, 0x00);

// this will allocate an average of our two previously allocated colors
$orange = imageblendedcolorallocate($im, $red, $yellow);

// yes, we do support alpha if you want to use transparent or translucent colors
$opaqueBlack = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 0);
$translucentBlack = imagecolorallocatealpha($im, 0x00, 0x00, 0x00, 63);
$blendedBlack = imageblendedcolorallocate($im, $opaqueBlack, $translucentBlack);

// by default we do a 50/50 blend where we average the red, blue, green & alpha values for each color
// we also support non-50/50 blends
$blue = imagecolorallocate($im, 0x00, 0x00, 0xFF);
$cyan = imagecolorallocate($im, 0x00, 0xFF, 0xFF);
$blendedMostlyCyan = imageblendedcolorallocate($im, $blue, $cyan, 0.25); // 25% blue, 75% cyan
$blendedEvenly = imageblendedcolorallocate($im, $blue, $cyan); // 50% blue, 50% cyan
$blendedMostlyBlue = imageblendedcolorallocate($im, $blue, $cyan, 0.75); // 75% blue, 25% cyan

```

There 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/).

Help Requests
-------------

[](#help-requests)

Please post any questions in the [discussions area](https://github.com/andrewgjohnson/imageblendedcolorallocate/discussions) on GitHub if you need help.

If 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).

Contributing
------------

[](#contributing)

Please read our [contributing guidelines](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/CONTRIBUTING.md) if you want to contribute.

You 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/).

[![Patreon - Become a Patron](https://camo.githubusercontent.com/24c60c4550632628010d5c53c8cf9abc46d101caea3a76f057bff8884850c3b5/68747470733a2f2f7261737465722e736869656c64732e696f2f62616467652f50617472656f6e2532302d6265636f6d6525323061253230506174726f6e2d4644333334412e706e673f7374796c653d666f722d7468652d6261646765266c6f676f3d70617472656f6e266c6f676f436f6c6f723d464433333441)](https://patreon.com/agjopensource)

Acknowledgements
----------------

[](#acknowledgements)

This project was started by [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson).

Full list of contributors:

- [Andrew G. Johnson (@andrewgjohnson)](https://github.com/andrewgjohnson)

Our [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).

Changelog
---------

[](#changelog)

You can find all notable changes in the [changelog](https://github.com/andrewgjohnson/imageblendedcolorallocate/blob/master/CHANGELOG.md).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance43

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~541 days

Recently: every ~675 days

Total

6

Last Release

3d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a2c654feaba88830ba4fd37496255b92c6404cb78f5e7d90186da1496141986?d=identicon)[andrewgjohnson](/maintainers/andrewgjohnson)

---

Top Contributors

[![andrewgjohnson](https://avatars.githubusercontent.com/u/1124501?v=4)](https://github.com/andrewgjohnson "andrewgjohnson (22 commits)")[![ImgBotApp](https://avatars.githubusercontent.com/u/31427850?v=4)](https://github.com/ImgBotApp "ImgBotApp (1 commits)")

---

Tags

composergdgraphicsimageimagesphpimagegdgraphicsimages

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/andrewgjohnson-imageblendedcolorallocate/health.svg)

```
[![Health](https://phpackages.com/badges/andrewgjohnson-imageblendedcolorallocate/health.svg)](https://phpackages.com/packages/andrewgjohnson-imageblendedcolorallocate)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k51.2M116](/packages/league-glide)[gregwar/image

Image handling

1.0k4.1M51](/packages/gregwar-image)[rosell-dk/webp-convert

Convert JPEG &amp; PNG to WebP with PHP

6038.1M54](/packages/rosell-dk-webp-convert)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[andrewgjohnson/imagettftextblur

imagettftextblur is a drop in replacement for imagettftext with added parameters to add blur, glow and shadow effects to your PHP GD images

27198.4k1](/packages/andrewgjohnson-imagettftextblur)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
