bicou / color-mixer
Spectral color mixer
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 6
pkg:composer/bicou/color-mixer
Requires
- php: >=8.2
- matthieumastadenis/couleur: v0.1.2
- spatie/color: ^1.7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: v3.93.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: 11.5.50
- dev-main
- dev-renovate/spatie-color-2.x
- dev-renovate/phpstan-packages
- dev-renovate/lock-file-maintenance
- dev-renovate/phpunit-phpunit-12.x
- dev-renovate/friendsofphp-php-cs-fixer-3.x
- dev-dependabot/composer/symfony/process-7.4.5
- dev-renovate/packagist-phpunit-phpunit-vulnerability
- dev-dependabot/composer/phpunit/phpunit-11.5.50
- dev-renovate/phpunit-phpunit-11.x
This package is auto-updated.
Last update: 2026-01-31 13:13:52 UTC
README
This package provides a spectral color mixer for use with spatie/color or matthieumastadenis/couleur.
Based on Spectral.js, itself based on the Kubelka-Munk theory.
Installation
composer require bicou/color-mixer
Usage with spatie/color
use Spatie\Color\Hex; use Bicou\ColorMixer\Spatie\SpatieMixer; $yellow = Hex::fromString('#f2de24'); $blue = Hex::fromString('#3f58fc'); $mixer = new SpatieMixer($yellow, $blue); $green = $mixer->at(0.5); echo $green->toHex(); // #7ca64d
Usage with matthieumastadenis/couleur
use matthieumastadenis\couleur\colors\HexRgb; use Bicou\ColorMixer\Couleur\CouleurMixer; $yellow = new HexRgb('F2', 'DE', '24'); $blue = new HexRgb('3F', '58', 'FC'); $mixer = new CouleurMixer($yellow, $blue); $green = $mixer->at(0.5); echo $green->toHexRgb(); // #7CA64D