## Image Color
获取图片看主要颜色,以方便根据颜色对图片进行分类排序
更多源码可访问 [http://www.wdphp.com](http://www.wdphp.com)
### Composer
~~~ bash
composer require zunyunkeji/image-color
~~~
## 使用示例
### Script
~~~ php
<?php
use zunyunkeji\imageColor\Image;
$img = new Image();
$img->load(__DIR__ . '/logo.jpg');
$info = $img->primaryColors();
print_r($info);
?>
~~~
### 返回数据
~~~ bash
Array
(
[red] => 66316
[white] => 10526
[light-pink] => 373
[light-red] => 325
[light-gray] => 245
[tan] => 30
[dark-orange] => 26
[pink] => 1
)
~~~
推荐扩展
-
topthink/think-ai
1年前
-
topthink/think-api
1年前
-
topthink/think-dumper
Dumper extend for thinkphp
11个月前 -
topthink/think-validate
think validate
1年前 -
yzh52521/think-mailer
A powerful and beautiful php mailer for All of ThinkPHP and Other PHP Frameworks based Symfony mailer
2年前