FLinearColor::LerpUsingHSV

Linearly interpolates between two colors by the specified progress amount.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/Color.h

Include

#include "Math/Color.h"

Source

/Engine/Source/Runtime/Core/Private/Math/Color.cpp

Syntax

static FLinearColor LerpUsingHSV
(
    const FLinearColor & From,
    const FLinearColor & To,
    const float Progress
)

Remarks

Linearly interpolates between two colors by the specified progress amount. The interpolation is performed in HSV color space taking the shortest path to the new color's hue. This can give better results than FMath::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

From

The color and alpha to interpolate from as linear RGBA

To

The color and alpha to interpolate to as linear RGBA

Progress

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