UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Color Namespace Reference

Namespaces

namespace  ACES
 

Classes

class  FColorSpace
 
struct  FColorSpaceTransform
 

Enumerations

enum class  EEncoding : uint8 {
  None = 0 , Linear = 1 , sRGB , ST2084 ,
  Gamma22 , BT1886 , Gamma26 , Cineon ,
  REDLog , REDLog3G10 , SLog1 , SLog2 ,
  SLog3 , AlexaV3LogC , CanonLog , ProTune ,
  VLog , Max
}
 
enum class  EColorSpace : uint8 {
  None = 0 , sRGB = 1 , Rec2020 = 2 , ACESAP0 = 3 ,
  ACESAP1 = 4 , P3DCI = 5 , P3D65 = 6 , REDWideGamut = 7 ,
  SonySGamut3 = 8 , SonySGamut3Cine = 9 , AlexaWideGamut = 10 , CanonCinemaGamut = 11 ,
  GoProProtuneNative = 12 , PanasonicVGamut = 13 , PLASA_E1_54 = 14 , ACESCAM16 = 15 ,
  Max
}
 
enum class  EChromaticAdaptationMethod : uint8 { None = 0 , Bradford = 1 , CAT02 = 2 , Max }
 
enum class  EWhitePoint : uint8 { CIE1931_D65 = 0 , ACES_D60 = 1 , DCI_CalibrationWhite , Max }
 

Functions

void PreloadWorkingColorSpace ()
 
TFunction< float(float)> GetTransferFunction (EEncoding SourceEncoding, bool bIsEncode)
 
TFunction< float(float)> GetEncodeFunction (EEncoding SourceEncoding)
 
TFunction< float(float)> GetDecodeFunction (EEncoding SourceEncoding)
 
float Encode (EEncoding SourceEncoding, float Value)
 
float Decode (EEncoding SourceEncoding, float Value)
 
TFunction< FLinearColor(const FLinearColor &)> GetColorEncodeFunction (EEncoding SourceEncoding)
 
TFunction< FLinearColor(const FLinearColor &)> GetColorDecodeFunction (EEncoding SourceEncoding)
 
FLinearColor Encode (EEncoding SourceEncoding, const FLinearColor &Color)
 
FLinearColor Decode (EEncoding SourceEncoding, const FLinearColor &Color)
 
FVector3d xyYToXYZ (const FVector3d &xyY)
 
FVector3d XYZToxyY (const FVector3d &XYZ)
 
template<typename T >
UE::Math::TMatrix< T > Transpose (const FMatrix44d &Transform)
 
FVector2d GetWhitePoint (EWhitePoint InWhitePoint)
 
float Linear (float Value)
 
float EncodeSRGB (float Value)
 
float DecodeSRGB (float Value)
 
float EncodeST2084 (float Value)
 
float DecodeST2084 (float Value)
 
float EncodeGamma22 (float Value)
 
float DecodeGamma22 (float Value)
 
float EncodeBT1886 (float Value)
 
float EncodeGamma26 (float Value)
 
float DecodeGamma26 (float Value)
 
float DecodeBT1886 (float Value)
 
float EncodeCineon (float Value)
 
float DecodeCineon (float Value)
 
float EncodeREDLog (float Value)
 
float DecodeREDLog (float Value)
 
float EncodeREDLog3G10 (float Value)
 
float DecodeREDLog3G10 (float Value)
 
float EncodeSLog1 (float Value)
 
float DecodeSLog1 (float Value)
 
float EncodeSLog2 (float Value)
 
float DecodeSLog2 (float Value)
 
float EncodeSLog3 (float Value)
 
float DecodeSLog3 (float Value)
 
float EncodeArriAlexaV3LogC (float Value)
 
float DecodeArriAlexaV3LogC (float Value)
 
float EncodeCanonLog (float Value)
 
float DecodeCanonLog (float Value)
 
float EncodeGoProProTune (float Value)
 
float DecodeGoProProTune (float Value)
 
float EncodePanasonicVLog (float Value)
 
float DecodePanasonicVLog (float Value)
 

Variables

constexpr uint32 ENCODING_TYPES_VER = 4
 
constexpr uint32 COLORSPACE_VER = 2
 
constexpr EChromaticAdaptationMethod DEFAULT_CHROMATIC_ADAPTATION_METHOD = EChromaticAdaptationMethod::Bradford
 

Enumeration Type Documentation

◆ EChromaticAdaptationMethod

List of available chromatic adaptation methods.

NOTE: This list is replicated as a UENUM in TextureDefines.h, and both should always match.

Enumerator
None 
Bradford 
CAT02 
Max 

◆ EColorSpace

List of available color spaces. (Increment COLORSPACE_VER upon breaking changes to the list.)

NOTE: This list is partially replicated as a UENUM in TextureDefines.h: any type exposed to textures should match the enum value below.

Enumerator
None 
sRGB 
Rec2020 
ACESAP0 
ACESAP1 
P3DCI 
P3D65 
REDWideGamut 
SonySGamut3 
SonySGamut3Cine 
AlexaWideGamut 
CanonCinemaGamut 
GoProProtuneNative 
PanasonicVGamut 
PLASA_E1_54 
ACESCAM16 
Max 

◆ EEncoding

List of available encodings/transfer functions.

NOTE: This list is replicated as a UENUM in TextureDefines.h, and both should always match.

Enumerator
None 
Linear 
sRGB 
ST2084 
Gamma22 
BT1886 
Gamma26 
Cineon 
REDLog 
REDLog3G10 
SLog1 
SLog2 
SLog3 
AlexaV3LogC 
CanonLog 
ProTune 
VLog 
Max 

◆ EWhitePoint

List of standard white points.

Enumerator
CIE1931_D65 
ACES_D60 
DCI_CalibrationWhite 
Max 

Function Documentation

◆ Decode() [1/2]

CORE_API FLinearColor UE::Color::Decode ( EEncoding  Encoding,
const FLinearColor Color 
)

Decode a color based on the specified encoding type. Note: Less optimal due to function pointer call.

◆ Decode() [2/2]

CORE_API float UE::Color::Decode ( EEncoding  Encoding,
float  Value 
)

Decode a value based on the specified encoding type. Note: Less optimal due to function pointer call.

◆ DecodeArriAlexaV3LogC()

float UE::Color::DecodeArriAlexaV3LogC ( float  Value)
inline

Decode value with an ARRI Alexa LogC encoding.

Returns
float decoded value.

◆ DecodeBT1886()

float UE::Color::DecodeBT1886 ( float  Value)
inline

Decode value with an ITU-R BT.1886 encoding.

Returns
float decoded value.

◆ DecodeCanonLog()

float UE::Color::DecodeCanonLog ( float  Value)
inline

Decode value with a Canon Log encoding.

Returns
float decoded value.

◆ DecodeCineon()

float UE::Color::DecodeCineon ( float  Value)
inline

Decode value with a Cineon encoding.

Returns
float decoded value.

◆ DecodeGamma22()

float UE::Color::DecodeGamma22 ( float  Value)
inline

Decode value with a Gamma 2.2 encoding.

Returns
float decoded value.

◆ DecodeGamma26()

float UE::Color::DecodeGamma26 ( float  Value)
inline

Decode value with a Gamma 2.6 encoding.

Returns
float decoded value.

◆ DecodeGoProProTune()

float UE::Color::DecodeGoProProTune ( float  Value)
inline

Decode value with a GoPro ProTune encoding.

Returns
float decoded value.

◆ DecodePanasonicVLog()

float UE::Color::DecodePanasonicVLog ( float  Value)
inline

Decode value with a Panasonic V-Log encoding.

Returns
float decoded value.

◆ DecodeREDLog()

float UE::Color::DecodeREDLog ( float  Value)
inline

Decode value with a RED Log encoding.

Returns
float decoded value.

◆ DecodeREDLog3G10()

float UE::Color::DecodeREDLog3G10 ( float  Value)
inline

Decode value with a RED Log3G10 encoding.

Returns
float decoded value.

◆ DecodeSLog1()

float UE::Color::DecodeSLog1 ( float  Value)
inline

Decode value with a Sony S-Log1 encoding.

Returns
float decoded value.

◆ DecodeSLog2()

float UE::Color::DecodeSLog2 ( float  Value)
inline

Decode value with a Sony S-Log2 encoding.

Returns
float decoded value.

◆ DecodeSLog3()

float UE::Color::DecodeSLog3 ( float  Value)
inline

Decode value with a Sony S-Log3 encoding.

Returns
float decoded value.

◆ DecodeSRGB()

float UE::Color::DecodeSRGB ( float  Value)
inline

Decode value with an sRGB encoding.

Returns
float decoded value.

◆ DecodeST2084()

float UE::Color::DecodeST2084 ( float  Value)
inline

Decode value with a SMPTE ST 2084:2014 encoding.

Returns
float decoded value.

◆ Encode() [1/2]

CORE_API FLinearColor UE::Color::Encode ( EEncoding  Encoding,
const FLinearColor Color 
)

Encode a color based on the specified encoding type. Note: Less optimal due to function pointer call.

◆ Encode() [2/2]

CORE_API float UE::Color::Encode ( EEncoding  Encoding,
float  Value 
)

Encode a value based on the specified encoding type. Note: Less optimal due to function pointer call.

◆ EncodeArriAlexaV3LogC()

float UE::Color::EncodeArriAlexaV3LogC ( float  Value)
inline

Encode value to ARRI Alexa LogC.

Returns
float encoded value.

◆ EncodeBT1886()

float UE::Color::EncodeBT1886 ( float  Value)
inline

Encode value to ITU-R BT.1886.

Returns
float encoded value.

◆ EncodeCanonLog()

float UE::Color::EncodeCanonLog ( float  Value)
inline

Encode value to Canon Log.

Returns
float encoded value.

◆ EncodeCineon()

float UE::Color::EncodeCineon ( float  Value)
inline

Encode value to Cineon.

Returns
float encoded value.

◆ EncodeGamma22()

float UE::Color::EncodeGamma22 ( float  Value)
inline

Encode value to Gamma 2.2.

Returns
float encoded value.

◆ EncodeGamma26()

float UE::Color::EncodeGamma26 ( float  Value)
inline

Encode value to Gamma 2.6.

Returns
float encoded value.

◆ EncodeGoProProTune()

float UE::Color::EncodeGoProProTune ( float  Value)
inline

Encode value to GoPro ProTune.

Returns
float encoded value.

◆ EncodePanasonicVLog()

float UE::Color::EncodePanasonicVLog ( float  Value)
inline

Encode value to Panasonic V-Log.

Returns
float encoded value.

◆ EncodeREDLog()

float UE::Color::EncodeREDLog ( float  Value)
inline

Encode value to RED Log.

Returns
float encoded value.

◆ EncodeREDLog3G10()

float UE::Color::EncodeREDLog3G10 ( float  Value)
inline

Encode value to RED Log3G10.

Returns
float encoded value.

◆ EncodeSLog1()

float UE::Color::EncodeSLog1 ( float  Value)
inline

Encode value to Sony S-Log1.

Returns
float encoded value.

◆ EncodeSLog2()

float UE::Color::EncodeSLog2 ( float  Value)
inline

Encode value to Sony S-Log2.

Returns
float encoded value.

◆ EncodeSLog3()

float UE::Color::EncodeSLog3 ( float  Value)
inline

Encode value to Sony S-Log3.

Returns
float encoded value.

◆ EncodeSRGB()

float UE::Color::EncodeSRGB ( float  Value)
inline

Encode value to sRGB.

Returns
float encoded value.

◆ EncodeST2084()

float UE::Color::EncodeST2084 ( float  Value)
inline

Encode value to SMPTE ST 2084:2014.

Returns
float encoded value.

◆ GetColorDecodeFunction()

CORE_API TFunction< FLinearColor(const FLinearColor &)> UE::Color::GetColorDecodeFunction ( EEncoding  Encoding)

Get the decode function that matches the encoding type.

◆ GetColorEncodeFunction()

CORE_API TFunction< FLinearColor(const FLinearColor &)> UE::Color::GetColorEncodeFunction ( EEncoding  Encoding)

Get the encode function that matches the encoding type.

◆ GetDecodeFunction()

CORE_API TFunction< float(float)> UE::Color::GetDecodeFunction ( EEncoding  Encoding)

Get the decode function that matches the encoding type.

◆ GetEncodeFunction()

CORE_API TFunction< float(float)> UE::Color::GetEncodeFunction ( EEncoding  Encoding)

Get the encode function that matches the encoding type.

◆ GetTransferFunction()

TFunction< float(float)> UE::Color::GetTransferFunction ( EEncoding  SourceEncoding,
bool  bIsEncode 
)
inline

◆ GetWhitePoint()

FVector2d UE::Color::GetWhitePoint ( EWhitePoint  InWhitePoint)
inline

Get standard white point coordinates.

Parameters
InWhitePointWhite point type.
Returns
FVector2d Chromaticity coordinates.

◆ Linear()

float UE::Color::Linear ( float  Value)
inline

◆ PreloadWorkingColorSpace()

void UE::Color::PreloadWorkingColorSpace ( )

◆ Transpose()

template<typename T >
UE::Math::TMatrix< T > UE::Color::Transpose ( const FMatrix44d Transform)
inline

Convenience function to get the transposed matrix, i.e. for pre-multiplied shader matrices.

Returns
TMatrix<T>

◆ xyYToXYZ()

FVector3d UE::Color::xyYToXYZ ( const FVector3d xyY)
inline

Convert chromaticity coordinate and luminance to CIE XYZ tristimulus values.

Returns
FVector3d

◆ XYZToxyY()

FVector3d UE::Color::XYZToxyY ( const FVector3d XYZ)
inline

Convert CIE XYZ tristimulus values to chromaticitiy coordinates and luminance.

Returns
FVector3d

Variable Documentation

◆ COLORSPACE_VER

constexpr uint32 UE::Color::COLORSPACE_VER = 2
inlineconstexpr

Increment upon breaking changes to the EColorSpace and EChromaticAdaptationMethod enums. Note that changing this forces a rebuild of textures that rely on it.

◆ DEFAULT_CHROMATIC_ADAPTATION_METHOD

constexpr EChromaticAdaptationMethod UE::Color::DEFAULT_CHROMATIC_ADAPTATION_METHOD = EChromaticAdaptationMethod::Bradford
constexpr

Default method used across the engine for chromatic adaptation.

◆ ENCODING_TYPES_VER

constexpr uint32 UE::Color::ENCODING_TYPES_VER = 4
inlineconstexpr

Increment upon breaking changes to the EEncoding enum. Note that changing this forces a rebuild of textures that rely on it.