Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UKismetMathLibrary
Description
Linearly interpolates between two colors by the specified Alpha amount (100% of A when Alpha=0 and 100% of B when Alpha=1). The interpolation is performed in HSV color space taking the shortest path to the new color's hue. This can give better results than a normal lerp, but is much more expensive. The incoming colors are in RGB space, and the output color will be RGB. The alpha value will also be interpolated.
| Name | LinearColorLerpUsingHSV |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h |
| Include Path | #include "Kismet/KismetMathLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl |
UFUNCTION (BlueprintPure,
Meta=(DisplayName="Lerp Using HSV (LinearColor)", ScriptMethod="LerpUsingHSVTo"),
Category="Math|Color")
static UE_FLinearColor LinearColorLerpUsingHSV
(
FLinearColor A,
FLinearColor B,
float Alpha
)
The interpolated color in linear RGB space along with the interpolated alpha value
Parameters
| Name | Remarks |
|---|---|
| A | The color and alpha to interpolate from as linear RGBA |
| B | The color and alpha to interpolate to as linear RGBA |
| Alpha | Scalar interpolation amount (usually between 0.0 and 1.0 inclusive) |