# getVehicleHeadLightColor (Shared)

> Returns the colour of a vehicle's headlights.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicles
- **URL**: https://wiki.mymp.gg/en/getVehicleHeadLightColor

## Syntax

```lua
int|false getVehicleHeadLightColor(vehicle vehicle)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `vehicle` | The vehicle. |

## Returns

Three numbers `r, g, b` from 0 to 255, or `false` if it could not be read.

## Example

```lua
addCommandHandler("corfarol", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if not vehicle then return end
    local r, g, b = getVehicleHeadLightColor(vehicle)
    outputDebugString(("headlights: %d, %d, %d"):format(r, g, b))
end)
```

## See also

- [setVehicleHeadLightColor (Shared)](https://wiki.mymp.gg/en/setVehicleHeadLightColor.md): Changes the colour of a vehicle's headlights.
- [getVehicleOverrideLights (Shared)](https://wiki.mymp.gg/en/getVehicleOverrideLights.md): Returns whether a vehicle's lights are forced on or off.
