Cool light is preferred for visual tasks because it produces higher contrast than warm light. Contrast is the brightness difference between different parts of the visual field, which is the area of space you can see at a given instant without moving your eyes. Warm light is preferred for living spaces because it is more flattering to colors of skin and clothes.
Lamps are assigned a color temperature (depending on the Kelvin temperature scale) on the basis of their “coolness” or “warmness.” The human eye perceives colors as cool if they are at the blue-green end of the spectrum of colors, and warm if they are at the red end of the spectrum.
However, please note that artificial light sources vary widely in their indices for the color rendering (CRI). The CRI is a measurement of a light source’s ability to render colors the same as sunlight does. For example, incandescent lamps are rated at a CRI of 100—nearly equal to sunlight—while some high-pressure sodium lamps have a CRI of 22, which means they render colors very poorly.
However, a light’s color-rendering ability is not related to whether it is a cool or warm color. For example, blue light from the northern sky, white light at noon, and red light from a sunset all have perfect color rendering (a CRI of 100) because our eyes are designed to read the colors of objects illuminated by sunlight.