Navigation
Unreal Engine C++ API Reference > Runtime > Core > Math
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Math/Color.h |
Include | #include "Math/Color.h" |
Syntax
struct FColor
Remarks
FColor Stores a color with 8 bits of precision per channel. Note: Linear color values should always be converted to gamma space before stored in an FColor, as 8 bits of precision is not enough to store linear space colors! This can be done with FLinearColor::ToFColor(true)
Variables
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FColor () |
Constructors. | |
![]() |
FColor
(
EForceInit |
||
![]() |
|||
![]() |
constexpr | Put these into the body for proper ordering with INTEL vs non-INTEL_BYTE_ORDER |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
float | DequantizeUNorm16ToFloat
(
int Value16 |
|
![]() ![]() |
float | DequantizeUNorm8ToFloat
(
int Value8 |
|
![]() ![]() |
const uint32 & | DWColor () |
|
![]() |
uint32 & | DWColor () |
|
![]() ![]() |
FColor | Creates a color value from the given hexadecimal string. | |
![]() ![]() |
FLinearColor | FromRGBE () |
Converts from RGBE to a linear float color as outlined in Gregory Ward's Real Pixels article, Graphics Gems II, page 80. |
![]() |
bool | InitFromString
(
const FString& InSourceString |
Initialize this Color based on an FString. |
![]() ![]() |
FColor | MakeFromColorTemperature
(
float Temp |
Converts temperature in Kelvins of a black body radiator to RGB chromaticity. |
![]() ![]() |
FColor | Makes a random but quite nice color. | |
![]() ![]() |
FColor | MakeRandomSeededColor
(
int32 Seed |
Makes a random color based on a seed. |
![]() ![]() |
FColor | MakeRedToGreenColorFromScalar
(
float Scalar |
Makes a color red->green with the passed in scalar (e.g. 0 is red, 1 is green) |
![]() ![]() |
FColor | MakeRequantizeFrom1010102
(
int R, |
Return 8-bit color Quantized from 10-bit RGB , 2-bit A |
![]() ![]() |
uint16 | QuantizeUNormFloatTo16
(
float UnitFloat |
|
![]() ![]() |
uint8 | QuantizeUNormFloatTo8
(
float UnitFloat |
Conversions to/from GPU UNorm floats, U8, U16 matches convention of FColorFLinearColor::QuantizeRound |
![]() ![]() |
FLinearColor | Reinterprets the color as a linear color. | |
![]() ![]() |
uint8 | Requantize10to8
(
int Value10 |
|
![]() ![]() |
uint8 | Requantize16to8
(
int Value16 |
|
![]() |
bool | ||
![]() |
bool | Serialize
(
FStructuredArchive::FSlot Slot |
|
![]() ![]() |
FString | ToHex () |
Converts this color value to a hexadecimal string.The format of the string is RRGGBBAA. |
![]() ![]() |
uint32 | ToPackedABGR () |
Gets the color in a packed uint32 format packed in the order ABGR. |
![]() ![]() |
uint32 | ToPackedARGB () |
Gets the color in a packed uint32 format packed in the order ARGB. |
![]() ![]() |
uint32 | ToPackedBGRA () |
Gets the color in a packed uint32 format packed in the order BGRA. |
![]() ![]() |
uint32 | ToPackedRGBA () |
Gets the color in a packed uint32 format packed in the order RGBA. |
![]() ![]() |
FString | ToString () |
Converts this color value to a string. |
![]() ![]() |
FColor |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | operator!=
(
const FColor& C |
|
![]() |
void | operator+=
(
const FColor& C |
|
![]() ![]() |
bool | operator==
(
const FColor& C |
Operators. |