Location: PHPKode > scripts > rgba.php > LeaVerou-rgba.php-9019a7e/index.html
<!doctype html>
<html>
<head>
	<title>rgba.php test page</title>
	<link href="style.css" rel="stylesheet" />
	<style>
		/* Demo */
		body {
			background: url('rgba.php?name=black&a=60');
			xbackground: rgba(0,0,0,.6);
		}
		
		h1 {
			background: url('rgba.php/rgba(255, 255, 255, .3)');
			xbackground: rgba(255, 255, 255, .3);
		}
		
		pre {
			background: url('rgba.php/rgba(255, 255, 255, .05)');
			xbackground: rgba(255, 255, 255, .05);
		}
	</style>
</head>
<body>
	<h1>rgba.php</h1>
	<p>
		Want to use RGBA in your projects but a solid color fallback for Internet Explorer and old browsers is just not good enough?
		Do you find that creating fallback semi-transparent pngs is too time-consuming? With rgba.php you get to use RGBA backgrounds in every browser with just one extra CSS declaration!
		All you need is a server supporting PHP.
	</p>
	
	<h2>How?</h2>
	<pre>background: url('rgba.php/rgba(255, 255, 255, 0.3)');
background: rgba(255, 255, 255, 0.3);</pre>
	<p>or, for named colors (you specify them, only black and white by default):</p>
		<pre>background: url('rgba.php?name=black&amp;a=50');
background: rgba(0, 0, 0, 0.5);</pre>
	<p>The old (v1.1 and below) way of specifying the color also works:</p>
	<pre>background: url('rgba.php?r=30&amp;g=120&amp;b=0&amp;a=70');
background: rgba(30, 120, 0, 0.7);</pre>
	
	<p>Please note:</p>
	<ul>
		<li>If you use the <em>a</em> parameter, bear in mind that it ranges from 0-100 instead of 0-1.</li>
		<li>The rgba.php declaration has to come before the native RGBA one, otherwise it will be applied even in RGBA-capable browsers</li>
	</ul>
	<p class="getitnow"><a href="https://github.com/LeaVerou/rgba.php">Get it now from Github</a></p>
	
	<h2>Installation</h2>
	<p>Just upload the file somewhere. Before you use it, open it with an editor to specify the directory you want it to use to store the created pngs (the default is <code>'colors/'</code>) and add any color names you want to be able to easily address (the defaults are white and black). If the directory you specify does not exist or isn’t writeable you’ll get an error.</p>
	
	<h2>History</h2>
	<p>I wrote the first version of rgba.php as a complement to <a href="http://leaverou.me/2009/02/bulletproof-cross-browser-rgba-backgrounds/">a blog post on RGBA that I posted on Februrary 2009</a>.
	Many people seemed to like the idea and started using it. With their valuable input, I made many changes and <a href="http://leaverou.me/2009/10/new-version-of-rgba-php-is-out/">released v.1.1</a> (1.1.1 shortly after I posted the article due to another little fix) on October 2009. 
	More than a year after, quite a lot of people still ask me about it and use it, so I decided to make a repo for it on Github and release a new version, with a much easier to use syntax for the URL.</p>
	<p class="getitnow"><a href="https://github.com/LeaVerou/rgba.php">Get it now from Github</a> and <a href="https://github.com/LeaVerou/rgba.php/toggle_watch">stay updated</a></p>
	<p id="footer">By <a href="http://leaverou.me">Lea Verou</a></p>
	<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
	<script type="text/javascript">
	try {
	var pageTracker = _gat._getTracker("UA-597483-5");
	pageTracker._trackPageview();
	} catch(err) {}
	</script>
</body>
</html>
Return current item: rgba.php