Light.color Manual     Reference     Scripting  
Scripting > Runtime Classes > Light

var color : Color


The color of the light.

To modify the light intensity you change light's color luminance. Lights always add illumination, so a light with a black color is the same as no light at all.

// Darken the light completely over a period of 2 seconds.
function Update () {
light.color -= Color.white / 2.0 * Time.deltaTime;

// Interpolate light color between two colors back and forth
var duration = 1.0;
var color0 =;
var color1 =;

function Update () {
// set light color
var t = Mathf.PingPong (Time.time, duration) / duration;
light.color = Color.Lerp (color0, color1, t);

See Also: Light component