定制 bicou/color-mixer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bicou/color-mixer

Composer 安装命令:

composer require bicou/color-mixer

包简介

Spectral color mixer

README 文档

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

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-31