A mathematical framework for biological color vision