PHP code example of sylvainjule / colorextractor
1. Go to this page and download the library: Download sylvainjule/colorextractor library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sylvainjule / colorextractor example snippets
'bnomei.janitor.jobs-extends' => [
'sylvainjule.colorextractor.jobs',
],
// config/config.php
return array(
'sylvainjule.colorextractor.mode' => 'dominant',
);
// config/config.php
return array(
'sylvainjule.colorextractor.fallbackColor' => '#000000',
);
$image->color();
$image->color()->dominantColor();
$image->color()->averageColor();