UKismetMathLibrary::HSVToRGB
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Constructs a FLinearColor in linear RGB space from individual hue, saturation, and value components. The preferred Blueprint node for generating colors from HSV parameters when each component is a separate float.
Caveats & Gotchas
- • H must be in [0, 360) — values outside this range are not clamped or wrapped automatically and can produce incorrect output. Use FMath::Fmod(H, 360.0f) to wrap if your hue might exceed 360.
- • The result is linear RGB, not sRGB. Plugging the output directly into a UI color field that expects sRGB (e.g., a UMG Image tint) may look too bright.
Signature
static UE_INL_API FLinearColor HSVToRGB(float H, float S, float V, float A = 1.0f) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| H | float | Hue in degrees [0.0, 360.0). | — |
| S | float | Saturation in [0.0, 1.0]. | — |
| V | float | Value (brightness) in [0.0, 1.0]. | — |
| A | float | Alpha in [0.0, 1.0]. | 1.0f |
Return Type
FLinearColor Example
Generate a vivid color from a hue angle C++
float Hue = 200.0f; // blue-ish
FLinearColor Color = UKismetMathLibrary::HSVToRGB(Hue, 1.0f, 1.0f);
DecalComponent->SetDecalColor(Color); See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?