{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Make Linear Color in Unreal Engine 5 C++UE Docs

The Make Linear Color Blueprint node builds an RGBA color from float channels. In C++ use FLinearColor Color(R, G, B, A);.

Blueprint node & C++ equivalent

C++
FLinearColor Color(1.0f, 0.5f, 0.0f, 1.0f);   // R, G, B, A

What does the Make Linear Color node do?

Make Linear Color combines four floating-point channels (red, green, blue, and alpha) into a single FLinearColor. Each channel is typically in the 0.0 to 1.0 range, though values can exceed 1.0 for HDR and emissive use.

FLinearColor is the color type used by materials, lights, and most rendering APIs because it stores values in linear space rather than gamma-corrected space.

The C++ equivalent

Use the constructor FLinearColor Color(1.0f, 0.5f, 0.0f, 1.0f); where the arguments are R, G, B, and A in that order. The alpha argument is optional and defaults to 1.0f if omitted.

Pass this color directly to functions like UMaterialInstanceDynamic::SetVectorParameterValue, light intensity setters, or debug draw calls that take an FLinearColor.

FLinearColor vs FColor

FLinearColor uses four floats in linear space, while FColor packs four 8-bit bytes (0 to 255) in sRGB space. For material parameters and lighting use FLinearColor; FColor is mainly for storage and pixel buffers.

Convert between them with FLinearColor::ToFColor(bSRGB) and the FColor to FLinearColor constructor when you cross that boundary.

Frequently asked questions

How do I make a color in UE5 C++?+

Construct an FLinearColor with float channels: FLinearColor Color(1.0f, 0.5f, 0.0f, 1.0f); for red, green, blue, and alpha. The alpha argument defaults to 1.0f if you leave it off.

What is the difference between FLinearColor and FColor?+

FLinearColor stores four floats in linear color space and is used by materials and lighting, while FColor packs four 8-bit bytes in sRGB and is used for storage and pixel data. Convert with ToFColor when needed.

Related Math nodes

View all Math nodes →