# getVehicleDirtColor (Shared)

> Tells the colour of the dirt on a vehicle's paint.

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

## Syntax

```lua
int, int, int|false getVehicleDirtColor(vehicle vehicle)
```

## Parameters

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

## Returns

Three numbers `r, g, b`, or `false` if it is not a vehicle. The default colour is `59, 57, 52`.

## Example

```lua
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local r, g, b = getVehicleDirtColor(vehicle)
    outputDebugString(("dirt %d %d %d"):format(r, g, b))
end
```

## See also

- [setVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/setVehicleDirtColor.md): Changes the colour of the dirt on a vehicle's paint, such as mud or sand.
- [resetVehicleDirtColor (Shared)](https://wiki.mymp.gg/en/resetVehicleDirtColor.md): Puts a vehicle's dirt back to the default colour, 59, 57, 52.
