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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

Color HSV (Flowgraph Node)

- **Node Name:** `Color HSV`

Overview

  • Node Name: Color HSV
  • Category: simple
  • File: extensions/flowgraph/nodes/util/hsvColor.lua

Creates a color using the HSV (Hue, Saturation, Value) color scheme. All input values are expected between 0 and 1.

Pin Schema

Input Pins

PinTypeDescription
hnumberHue (0–1, wraps around)
snumberSaturation (0–1)
vnumberValue / brightness (0–1)
anumberAlpha; controls paint chrominess on vehicles

Output Pins

PinTypeDescription
colorcolorRGBA color output as {r, g, b, a}

Internals

Key Methods

MethodDescription
init()Empty initializer
HSVtoRGB(h, s, v)Wraps the engine HSVtoRGB() function with clamping
work()Converts HSV inputs to RGB, appends alpha, outputs color

Clamping Behavior

  • Hue is wrapped using h - math.floor(h) so values outside 0–1 wrap around naturally.
  • Saturation and Value are clamped to 0–1 range with math.max(0, math.min(1, x)).
  • Defaults: h=0, s=1, v=1, a=1 when pins are unconnected.

How It Works

  1. Reads H, S, V, A values from input pins (with defaults for nil values).
  2. Converts HSV to RGB using the engine's HSVtoRGB() function.
  3. Packs the result as {r, g, b, a} and outputs as a color type.

Usage Example

-- Create a pure red color:
-- [Color HSV] h=0, s=1, v=1 → color → [Set Vehicle Color]

-- Animate hue over time for a rainbow effect:
-- [Timer] → normalized → h → [Color HSV] s=1, v=1
--                              → color → [Set Vehicle Color]

-- HSVtoRGB can also be called directly in Lua:
local r, g, b = HSVtoRGB(0.5, 1.0, 1.0)  -- cyan

Key Dependencies

  • HSVtoRGB() - engine-level color conversion function

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Hide Loading Screen (Flowgraph Node)

- **Node Name:** `Hide Loading Screen`

Line Point From Xnorm (Flowgraph Node)

- **Node Name:** `Line Point From Xnorm`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsClamping BehaviorHow It WorksUsage ExampleKey DependenciesSee Also