RealDocs

UKismetMathLibrary::LinearColor_Transparent

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

Description

Returns transparent black (0, 0, 0, 0). Useful as a starting color for fade-in animations or to hide widgets while preserving layout space.

Caveats & Gotchas

  • RGB values are all zero (black). When interpolating toward another color with Lerp, the intermediate values will carry a black tint until alpha reaches 1. Use the target color with alpha = 0 instead if you want a pure fade without color bleed.
  • Materials and widgets may need to have their blend mode set to Translucent or additive for alpha below 1 to be respected visually.

Signature

static UE_INL_API FLinearColor LinearColor_Transparent();

Return Type

FLinearColor

Example

Start a widget fully transparent then fade to white C++
// At spawn
Widget->SetColorAndOpacity(UKismetMathLibrary::LinearColor_Transparent());
// Over time
FLinearColor Current = Widget->GetColorAndOpacity().GetSpecifiedColor();
FLinearColor Target = UKismetMathLibrary::LinearColor_White();
Widget->SetColorAndOpacity(FLinearColor::LerpUsingHSV(Current, Target, DeltaTime * FadeSpeed));

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.