UKismetMathLibrary::Add_LinearColorLinearColor
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Adds two linear colors channel-by-channel (R+R, G+G, B+B, A+A). The Blueprint + operator for LinearColor.
Caveats & Gotchas
- • Result channels are not clamped — adding two bright colors can easily exceed 1.0 per channel, producing values that blow out in LDR rendering contexts.
- • Alpha is also added, so two fully opaque colors (A=1) produce A=2, which may cause unexpected blending in UI or translucent materials.
Signature
static UE_INL_API FLinearColor Add_LinearColorLinearColor(FLinearColor A, FLinearColor B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FLinearColor | First color. | — |
| B | FLinearColor | Second color. | — |
Return Type
FLinearColor Example
Additive color blend for emissive layering C++
FLinearColor BaseEmissive = FLinearColor(0.5f, 0.0f, 0.0f, 0.f);
FLinearColor ExtraEmissive = FLinearColor(0.0f, 0.3f, 0.0f, 0.f);
FLinearColor Combined = UKismetMathLibrary::Add_LinearColorLinearColor(BaseEmissive, ExtraEmissive);
// Combined = (0.5, 0.3, 0.0, 0.0) See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?