UKismetMathLibrary::LinearColorLerpUsingHSV

Linearly interpolates between two colors by the specified Alpha amount (100% of A when Alpha=0 and 100% of B when Alpha=1).

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h

Include

#include "Kismet/KismetMathLibrary.h"

Source

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl

Syntax

static FLinearColor LinearColorLerpUsingHSV
(
    FLinearColor A,
    FLinearColor B,
    float Alpha
)

Remarks

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.

Returns

The interpolated color in linear RGB space along with the interpolated alpha value

Parameters

Parameter

Description

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)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss