Environmental gradients predict the ratio of environmentally acquired carotenoids to self-synthesised pteridine pigments