How color visual pigments are tuned