An ectothermic animal depends upon its surroundings to regulate its body temperature. This means that animals such as reptiles and amphibians seek warm or hot areas if their body temperature is too cold, and move to cooler areas if their internal temperature rises too high.
"Color" is determined by the wavelength contained within a beam of light. Red colors have a wavelength in the range of 700 nanometers; yellow light has a wavelength of approximately 550 nanometers; blue light has a wavelength of roughly 450 nanometers. Objects appear to have color because the wavelengths of other colors are absorbed by the object and the reflected waves give it an apparent color.
When an ectothermic animal moves to an area that appears to be blue, for example, it will feel the heat produced by roughly 450 nanometers. If that same animal moves to an area that appears red, it will feel heat generated by a beam of light measuring 700 nanometers. Because the larger distance (in nanometers) leads to a higher temperature, the ectothermic animal will be able to absorb more heat into its body by moving to an object that is in the family of red colors.