I made a weensy little script for the theme I recently made (which I still have not named or prepared for distribution) which will generate single pixel transparent pngs to use as tiled background images in css.
demonstration toy
<?php $p = imagecreatetruecolor(1, 1); imagesavealpha($p, true); $o = (100 - (int) $_GET['o']) * 1.27; $c = imagecolorallocatealpha($p, (int) $_GET['r'], (int) $_GET['g'], (int) $_GET['b'], $o); imagefill($p, 0, 0, $c); header("Content-type: image/png"); imagepng($p); ?>
usage / parameters:
- r
- how much red to include: r=[0-255]
- g
- how much green to include: g=[0-255]
- b
- how much blue to include: b=[0-255]
- o
- how opaque the pixel should be: o=[0(fully transparent)-100(fully opaque)]
so…
- pixler.php?r=255&g=255&b=255&o=50
- will make a white pixel that is 50% visible.
- pixler.php?r=255&o=100
- will make a red pixel that is fully visible.
- pixler.php
- calling the script with no parameters will create an invisible black pixel (…).
