SyntaxFix
Write A Post
Hire A Developer
Questions
you can use md5 for that purpose,very short
$color = substr(md5(rand()), 0, 6);