RealDocs

UKismetMathLibrary::HSVToRGBLinear

function Engine Blueprint Since 4.18
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Converts a packed HSV FLinearColor (H in R, S in G, V in B) to linear RGB and returns it by value. Functionally identical to HSVToRGB_Vector but returns the result rather than writing to an output parameter, making it easier to chain in expressions.

Caveats & Gotchas

  • The HSV packing convention — H in R (0–360), S in G, V in B — is the same as HSVToRGB_Vector but differs from some external tools that order fields differently. Double-check channel assignments when importing HSV data from outside UE.
  • Returning by value means a copy of FLinearColor (16 bytes) is made on each call. In hot paths processing many colors per frame, prefer HSVToRGB_Vector which writes directly to a variable.

Signature

static UE_INL_API FLinearColor HSVToRGBLinear(FLinearColor HSV)

Parameters

Name Type Description Default
HSV FLinearColor A FLinearColor with H in R, S in G, V in B. Alpha is passed through.

Return Type

FLinearColor

Example

Inline HSV-to-RGB in an expression C++
// Build HSV packed: hue = 45°, full saturation, full value
FLinearColor HSVPacked(45.0f, 1.0f, 1.0f, 1.0f);
FLinearColor LinearRGB = UKismetMathLibrary::HSVToRGBLinear(HSVPacked);
Light->SetLightColor(LinearRGB);

Version History

Introduced in: 4.18

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.