Improved the user color generation code and added a test for that feature