<?php $img = imagecreatefrompng( 'https://www.tutorialspoint.com/images/tp-logo-diamond.png'); imagetruecolortopalette($img, false, 255); $match = imagecolorclosestalpha($img, 180, 100, 150, 110); $match = imagecolorsforindex($img, $match); $match = "({$match['red']}, {$match['green']}, {$match['blue']}, {$match['alpha']})"; echo $match; imagedestroy($img); ?>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more