RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console
Vehicle ColorsVehicle In-Place EditVehicle ManagerVehicle MirrorVehicle Part Management

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 Extensionscorevehicle

Vehicle Colors

Manages vehicle paint colors: setting, converting, and syncing paint data.

Manages vehicle paint colors: setting, converting, and syncing paint data.


Overview

Extension: core_vehicle_colors - Provides functions to set vehicle colors by index (up to 3 paint slots), convert color strings to tables, and sync paint data with vehicle config. Handles the color format used by BeamNG's vehicle system (RGBA with 0–2 alpha range).


Public Functions

FunctionDescription
M.setVehicleColor(index, colorString, objID)Sets paint by 0-based index from a color string
M.setVehiclePaint(index, paint, objID)Sets paint by 1-based index from a paint table
M.colorStringToColorTable(colorString)Converts "r g b a" string to {r,g,b,a} table (alpha mapped 0–2→0–1)
M.onVehicleSpawned(vehId)Syncs vehicle paint data from engine object to config

Color String Format

"r g b a [m1 m2 m3 m4]"
  • r, g, b: 0–1 float color components
  • a: 0–2 metallic/clearcoat value (mapped to 0–1 internally)
  • m1–m4: Optional metallic paint data

Usage Examples

-- Set primary color to red (index 0 = first paint slot)
core_vehicle_colors.setVehicleColor(0, "1 0 0 1")

-- Set paint using paint table (1-based index)
local paint = createVehiclePaint({x=0, y=0, z=1, w=1}, {})
core_vehicle_colors.setVehiclePaint(1, paint)

-- Convert color string
local color = core_vehicle_colors.colorStringToColorTable("0.5 0.5 0.5 1.0")
-- Returns {0.5, 0.5, 0.5, 0.5}

Paint Slots

Index (0-based)SlotEngine Property
0Primaryveh.color
1Secondaryveh.colorPalette0
2Tertiaryveh.colorPalette1

See Also

  • Vehicle Manager - Paint color live updates

Texture Quality

Defines texture quality presets for the GraphicsQualityGroup system.

Vehicle In-Place Edit

In-game vehicle part editor with keyboard-driven navigation and live part swapping.

On this page

OverviewPublic FunctionsColor String FormatUsage ExamplesPaint SlotsSee Also