UKismetMathLibrary::HSVToRGB_Vector
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Converts a HSV color packed into a FLinearColor (R=H, G=S, B=V) to linear RGB, writing the result into a second FLinearColor. This vector form avoids breaking the HSV triple into separate floats and is convenient when working with colour data already stored in FLinearColor.
Caveats & Gotchas
- • The mapping of H/S/V onto R/G/B channels of a FLinearColor is non-obvious: H is in R (0–360), S in G (0–1), V in B (0–1). A FLinearColor constructed from MakeLinearColor will NOT produce correct results unless you manually assign channels with this channel ordering.
- • The alpha of the input HSV FLinearColor (A channel) is carried through to the output RGB FLinearColor unchanged — it is not treated as part of the HSV data.
Signature
static UE_INL_API void HSVToRGB_Vector(FLinearColor HSV, FLinearColor& RGB) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| HSV | FLinearColor | A LinearColor used as a packed HSV triple: R = Hue [0..360), G = Saturation [0..1], B = Value [0..1]. The A channel is copied through to output.A. | — |
| RGB | FLinearColor& | Output: the converted linear RGB color. | — |
Return Type
void Example
Convert a packed HSV FLinearColor to RGB C++
FLinearColor HSVPacked(180.0f, 0.8f, 0.9f, 1.0f); // cyan-ish
FLinearColor RGBResult;
UKismetMathLibrary::HSVToRGB_Vector(HSVPacked, RGBResult); See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?