Improve hash algorithm

More efficient and shorter hash algorithm for user's color property.