<?php
declare(strict_types=1);

$source = imagecreatetruecolor(2, 2);
imagefill($source, 0, 0, imagecolorallocate($source, 200, 10, 20));
$target = imagecreate(2, 2);
imagecolorallocate($target, 180, 0, 0);
var_dump(imagecolormatch($source, $target));
echo imagecolorsforindex($target, 0)["red"], "\n";
