Moved color generation to server side and removed redundant code