Created
January 2, 2022 13:08
-
-
Save frikishaan/98b2696895745613cbde231d5a73cfd6 to your computer and use it in GitHub Desktop.
Generate random color hex code in PHP
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 | |
function generateHexColor() : string | |
{ | |
return substr(str_shuffle('ABCDEF0123456789'), 0, 6); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment