-
-
Save NassimRehali15/d0e86206cfa4a7912f449459ae89d5d4 to your computer and use it in GitHub Desktop.
PHP Random Color Generator Hex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $color = '#'.dechex(rand(0x000000, 0xFFFFFF)); ?> | |
<body style="background-color: <?php echo $color; ?>;"> | |
<h1><?php echo $color ?></h1> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment