Registration validation, random color function added

Registration validation, random color function added