Replace random color generator with color hash function