RealDocs

UKismetMathLibrary::EqualEqual_LinearColorLinearColor

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if A and B are exactly equal (A == B) on all four channels. This is the Blueprint == operator for LinearColor.

Caveats & Gotchas

  • Performs exact floating-point comparison — two colors produced independently through arithmetic are unlikely to be exactly equal even if they represent the same logical color. Use LinearColor_IsNearEqual with a tolerance for arithmetic results.
  • Despite the header comment mentioning "error tolerance", this function takes no tolerance parameter and performs an exact == comparison.

Signature

static UE_INL_API bool EqualEqual_LinearColorLinearColor(FLinearColor A, FLinearColor B);

Parameters

Name Type Description Default
A FLinearColor First color.
B FLinearColor Second color.

Return Type

bool

Example

Compare against a literal color constant C++
FLinearColor Current = GetCurrentColor();
if (UKismetMathLibrary::EqualEqual_LinearColorLinearColor(Current, FLinearColor::Black))
{
    // Exactly black — only reliable for constants, not computed values
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.