Mix CSS colors like paint.

1.0.2 2017-01-30 00:16 UTC

This package is not auto-updated.

Last update: 2020-08-07 20:20:58 UTC


Mix CSS colors like paint.

Supports the CSS color keywords up to Color Module Level 4 and hexadecimal values with or without a leading hash #

See example.php for some basic usage mixing 5 colors. The background color and the 6th panel are the mix of the given colors.

use jpuck\ColorMixer\Mixer;

$colors = [

$mix = ( new Mixer(...$colors) )->mix()->hex();

color output from example.php


Requires PHP 7

Registered on packagist for easy installation using composer.

composer require jpuck/color-mixer
Branch Status
master Build Status Codecov

License Total Downloads Latest Stable Version