Initialize

This commit is contained in:
2022-09-04 03:34:03 +02:00
commit 5a1c146790
2 changed files with 16 additions and 0 deletions

12
index.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
$my_img = imagecreate(15, 15);
$hexcol = htmlspecialchars($_GET['hexcol']);
$r = hexdec(substr($hexcol, 0, 2));
$g = hexdec(substr($hexcol, 2, 2));
$b = hexdec(substr($hexcol, 4, 2));
$background = imagecolorallocate($my_img, $r, $g, $b);
header("Content-type: image/png");
imagepng($my_img);
imagecolordeallocate($my_img, $background);
imagedestroy($my_img);
die();