Skip to content

Instantly share code, notes, and snippets.

@born2discover
Forked from bastianallgeier/hsl.php
Last active December 21, 2015 12:39
Show Gist options
  • Save born2discover/6307699 to your computer and use it in GitHub Desktop.
Save born2discover/6307699 to your computer and use it in GitHub Desktop.
This script allows generation of random colours for CSS markup.
<?php
/**
* A simple php script to generate random CSS colors at each request.
*/
$hsl = rand(0, 240) . ',' . rand(50, 80) . '%,60%';
?>
<style type="text/css">
a {
color: hsl(<?php echo $hsl ?>);
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment