UKismetMathLibrary::LinearColor_GetMax
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the largest channel value among R, G, B, and A in the given linear color.
Caveats & Gotchas
- • Includes the alpha channel in the comparison — if alpha is 1.0 and all RGB channels are below 1.0, this returns 1.0, which may be surprising when you only care about color intensity.
- • For HDR colors with values above 1.0, the result will exceed 1.0.
Signature
static UE_INL_API float LinearColor_GetMax(FLinearColor InColor); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InColor | FLinearColor | Color to inspect. | — |
Return Type
float Example
Normalize a color to its brightest channel C++
FLinearColor Color = FLinearColor(0.2f, 0.8f, 0.4f, 1.f);
float MaxChannel = UKismetMathLibrary::LinearColor_GetMax(Color);
FLinearColor Normalized = Color / MaxChannel; Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?