Chlorophyll degrades below 67 degrees farenheight, a combination of genetics/temperatures. The pigments within the leaves are not actually green, but the only light spectrum they don't "eat" is green therefore it is reflected back to your eyes as green, the CR photoreceptors on a plant is responsible for detecting blue/uv manufacturing the purple pigments using light energy from the UV/Blue spectrums to produce the anthocyanins within the plant. The plant decides that using pigment that absorbs more "purples/blues" would be more beneficial and initiates the change.