# PED::_SET_PED_LOCAL_VFX_COLOR

- **Hash:** `0xDD9540E7B1C9714F`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `SetPedLocalVfxColor`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **Other names:** `_SET_PED_TORCH_VFX_COLOR`
- **URL:** https://natives.borderlinerp.com/natives/PED/_SET_PED_LOCAL_VFX_COLOR

## Signature

```c
void _SET_PED_LOCAL_VFX_COLOR(Ped ped, Hash vfxNodeHash, float r, float g, float b);
```

## Parameters

- `ped` (`Ped`)
- `vfxNodeHash` (`Hash`)
- `r` (`float`)
- `g` (`float`)
- `b` (`float`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Sets the RGB color for a specific volumetric VFX/particle node attached to a ped outfit or component.
Observed from RDO fm_mission_controller. The native only works if the component containing the VFX node is equipped.
It colors smoke/volumetrics and leaves core fire sprites untouched. Color values are normalized floats in the 0.0..1.0 range.

*Source: VORPCORE RDR3natives*

The native WILL NOT WORK if the specific component containing the VFX node is not equipped on the ped (e.g., the torch outfit -368114487 must be equipped first via _EQUIP_META_PED_OUTFIT).
It only colors the smoke/volumetrics, leaving the core fire sprites untouched.
Values greater than 1.0f are clamped to 1.0f by the engine. To achieve specific RGB shades, you MUST normalize 0-255 values by dividing them by 255.0f (e.g., 128 becomes 0.5f)

## Usage

### Lua

```lua
SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b)

-- always available, by hash
Citizen.InvokeNative(0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b)
```

### JavaScript

```js
SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b);

// by hash
Citizen.invokeNative('0xDD9540E7B1C9714F', ped, vfxNodeHash, r + 0.0000001, g + 0.0000001, b + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.
- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

## Examples

*Source: VORPCORE RDR3natives*

```lua
RegisterCommand("testcolor", function()
  
        local playerPed = PlayerPedId()
        local horse = GetMount(playerPed)

        if  horse ~= 0 then
            local outfitHash = -368114487
            Citizen.InvokeNative(0x1902C4CFCC5BE57C, horse, outfitHash)
            Citizen.InvokeNative(0x704C908E9C405136, horse)

            Wait(500)

            local componentHash = -929362906
            local r, g, b = 1.0, 0.0, 0.0

            Citizen.InvokeNative(0xDD9540E7B1C9714F, horse, componentHash, r, g, b)
        end
end, false)
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
