RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Align For CouplingApply Velocity to VehicleBoost VehicleSet Vehicle ColorsCustom Parts Config ProviderEnter VehicleFlip UprightFreeze VehicleGenerate License PlateGet Vehicle ActiveGet Electrics ValueGet GearboxmodeGet Powertrain DataGravity ForceDistance From GroundHas Coupler TagIs CoupledIs Player UsableKeep VehicleMove Vehicle ToOn Cannon FiredOn Vehicle DestroyedOn Vehicle ResetOn Vehicle SpawnedOn Vehicle SwitchedPlayer UsableRandom Config ProviderRecover In PlaceRemove VehicleTimeline ReplaySet Vehicle ActiveSet Gearbox ModeSet IgnitionSet License PlateSet LightbarSet LightsShift to Gear IndexSpawn VehicleVehicle StatesTeleport To Last RoadToggle Vehicle ControlsMove To ShowroomVehicle TouchProps TouchStatic Object TouchTrack VehicleTrailer Respawn ControlVehicle Config ProviderGet Vehicle DataGet Vehicle DataGet Vehicle BoundsVehicle PingGet Vehicle Wheel Center

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsflowgraphnodesvehicle

Set Vehicle Colors

- **Node Name:** `Set Vehicle Colors`

Overview

  • Node Name: Set Vehicle Colors
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/colors.lua

Sets the primary, secondary, and tertiary paint colors on a vehicle. Each color pin uses the vehicle color format (baseColor RGBA + metallic paint parameters).

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of vehicle to change color on. If empty, player vehicle is used
color1colorPrimary color
color2colorSecondary color
color3colorTertiary color

Legacy Pins

Old NameNew Name
vehIDvehId

Internals

Key Methods

MethodDescription
postInit()Configures all three color pins with vehicleColor = true for the color picker UI
work()Reads each color pin, creates paint data via createVehiclePaint, applies to the vehicle object, then calls setMetallicPaintData

Color Mapping

Color PinVehicle Property
color1obj.color (primary)
color2obj.colorPalette0 (secondary)
color3obj.colorPalette1 (tertiary)

How It Works

  1. The node resolves the vehicle object by ID (or defaults to the player vehicle).
  2. For each non-nil color pin, it extracts an 8-element array: [r, g, b, a, metallic1, metallic2, metallic3, metallic4].
  3. createVehiclePaint({x,y,z,w}, {metallic params}) produces a paint table with baseColor.
  4. The base color is converted to linear color space via ColorF(...):asLinear4F() and assigned to the appropriate vehicle property.
  5. All paint data is collected into a table and applied via obj:setMetallicPaintData(paintsData).

Usage Example

-- In a flowgraph:
-- [Color Provider (red)] → color1 → [Set Vehicle Colors] ← vehId ← [Get Player Vehicle]
--
-- Color values are 8-element arrays:
-- {r, g, b, a, metallic1, metallic2, metallic3, metallic4}

-- Programmatic equivalent:
local paint = createVehiclePaint({x=1, y=0, z=0, w=1}, {0.5, 1.0, 0.0, 0.0})
obj.color = ColorF(paint.baseColor[1], paint.baseColor[2], paint.baseColor[3], paint.baseColor[4]):asLinear4F()
obj:setMetallicPaintData({[1] = paint})

Key Dependencies

  • createVehiclePaint() - converts color arrays into paint data structures
  • ColorF:asLinear4F() - converts sRGB color to linear color space
  • obj:setMetallicPaintData() - applies metallic paint properties to vehicle

See Also

  • Align for Coupling (Flowgraph Node) - Related reference
  • Apply Velocity to Vehicle (Flowgraph Node) - Related reference
  • Boost Vehicle (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Boost Vehicle

- **Node Name:** `Boost Vehicle`

Custom Parts Config Provider

- **Node Name:** `Custom Parts Config Provider`

On this page

OverviewPin SchemaInput PinsLegacy PinsInternalsKey MethodsColor MappingHow It WorksUsage ExampleKey DependenciesSee Also