in a project I'm making I'm using numerous color codes. the point is not for them to be Beautiful, just differents.(I also want to be able to constantly have the same colors code for the same fields on refresh (no Random color generators)) I was thinking about taking the name of the fields and turn them to Hex color. Is there a pre-defined function for this?
Exemple :
$string = "Blablabla";
$colorCode = toColorCode($string);
function toColorCode($initial){
/*MAGIC MADNESS*/
return array("R"=>XXX,"G"=>XXX,"B"=>XXX);
}
FORGOT TO MENTION : it's important that the values are Numbers only.