1
Here’s exactly what you want in PHP: https://github.com/thephpleague/color-extractor
Example:
require 'vendor/autoload.php';
use League\ColorExtractor\Client as ColorExtractor;
$client = new ColorExtractor;
$image = $client->loadPng('./some/image.png');
// Get the most used color hexadecimal codes from image.png
$palette = $image->extract();
Source: (https://stackoverflow.com/questions/10290259/detect-main-colors-in-an-image-with-php)
I don’t know what to do... I put this code on the website, but nothing happens..
– Matheus Vitor