ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehiclePaletteColor

Function

getVehiclePaletteColor

Server and clientVehiclesTrilogy Hub only

Returns the colour with the given number from the game's vehicle palette (0-127) and its name. The RGB values are exactly what the Definitive Edition draws, so they suit e.g. a colour preview in a paint shop.

Syntax

int, int, int, string getVehiclePaletteColor(int id)

Arguments

idint
Colour number 0-127.

Returns

r, g, b and the colour name, or false for a bad number.

Example

for id = 0, 7 do
    local r, g, b, name = getVehiclePaletteColor(id)
    outputDebugString(("%d: %s (%d, %d, %d)"):format(id, name, r, g, b))
end

See also