---
name: "setLightColor"
type: command
status: ok
groups: ["Lights"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setLightColor
revid: 309010
updated: 2022-04-25T11:42:18Z
---

# setLightColor

*Command · Lights · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **local** · effect **local**

## Description

Set diffuse color of light. Illuminates surfaces that are facing the light.

## Syntax

```sqf
light setLightColor [r, g, b]
```

**Parameters:**

- `light`: [Object](../topics/Object.md)
- `r`: [Number](../topics/Number.md) - red value in range 0..1
- `g`: [Number](../topics/Number.md) - green value in range 0..1
- `b`: [Number](../topics/Number.md) - blue value in range 0..1

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
myLight setLightColor [0.5,0,0]; // produces red
```

## See also

[setLightAmbient](../commands/setLightAmbient.md) · [setLightBrightness](../commands/setLightBrightness.md) · [lightAttachObject](../commands/lightAttachObject.md) · [lightDetachObject](../commands/lightDetachObject.md) · [setLightIntensity](../commands/setLightIntensity.md) · [setLightAttenuation](../commands/setLightAttenuation.md) · [setLightUseFlare](../commands/setLightUseFlare.md) · [setLightFlareSize](../commands/setLightFlareSize.md) · [setLightFlareMaxDistance](../commands/setLightFlareMaxDistance.md) · [setLightDayLight](../commands/setLightDayLight.md) · [setLightIR](../commands/setLightIR.md)

## Community notes

**Feersum** — 2006-12-01

Light can be created with command [createVehicleLocal](../commands/createVehicleLocal.md) with special vehicle class `"#lightpoint"`

for example:

```sqf
_light = "#lightpoint" createVehicleLocal pos;
_light setLightBrightness 1.0;
_light setLightAmbient [0.0, 1.0, 0.0];
_light setLightColor [0.0, 1.0, 0.0];
_light lightAttachObject [_object, [0,0,0]];
```

---

**ColonelSandersLite** — 2017-08-17

To clarify:
- [setLightAmbient](../commands/setLightAmbient.md) - Terrain and surrounding objects are bathed in this colour.
- [setLightColor](../commands/setLightColor.md) - Controls the "haze" seen around the lightsource (ex flares).

---

**ffur2007slx2_5** — 2014-03-24

1. In Arma 3 ver 1.14 [setLightColor](../commands/setLightColor.md) will also change the color of the flare when [setLightUseFlare](../commands/setLightUseFlare.md), [setLightFlareSize](../commands/setLightFlareSize.md) and [setLightFlareMaxDistance](../commands/setLightFlareMaxDistance.md) were used on the same light source. For example:

```sqf
_light setLightUseFlare true;
_light setLightFlareSize 2;
_light setLightFlareMaxDistance 60;
_light setLightColor [1, 1, 1];
```

2. When both [setLightAmbient](../commands/setLightAmbient.md) and [setLightColor](../commands/setLightColor.md) are [0,0,0], there won’t be any visual presentation on the light source.

<sub>Source: [BI Community Wiki — setLightColor](https://community.bistudio.com/wiki/setLightColor) (revision 309010).</sub>
