Catch an HTML color As IMAGE [duplicate]

1

How to capture a color in HTML but this color must be similar to the image ...

EXAMPLE: (THE BACKGROUND AND APPEARED WITH THE IMAGE)

EXAMPLE02:(REPAIRTHEBACKGROUND!)

How can I do this to get the color in HTML , so can I use this color wherever I want ...?

    
asked by anonymous 11.12.2018 / 22:04

1 answer

1

Here's exactly what you want in PHP: link

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: ( link )

    
11.12.2018 / 22:09