Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
FColor Struct Reference

#include <Color.h>

Public Member Functions

uint8GCC_ALIGN (4)
 
uint32DWColor (void)
 
const uint32DWColor (void) const
 
FORCEINLINE FColor ()
 
FORCEINLINE FColor (EForceInit)
 
FORCEINLINE FColor (uint8 InR, uint8 InG, uint8 InB, uint8 InA=255)
 
FORCEINLINE FColor (uint32 InColor)
 
FORCEINLINE bool operator== (const FColor &C) const
 
FORCEINLINE bool operator!= (const FColor &C) const
 
FORCEINLINE void operator+= (const FColor &C)
 
FLinearColor FromRGBE () const
 
FColor WithAlpha (uint8 Alpha) const
 
FORCEINLINE FLinearColor ReinterpretAsLinear () const
 
FORCEINLINE uint32 ToPackedARGB () const
 
FORCEINLINE uint32 ToPackedABGR () const
 
FORCEINLINE uint32 ToPackedRGBA () const
 
FORCEINLINE uint32 ToPackedBGRA () const
 

Static Public Member Functions

static FColor FromHex (const FString &HexString)
 
static FColor MakeRandomColor ()
 
static FColor MakeRedToGreenColorFromScalar (float Scalar)
 
static FColor MakeFromColorTemperature (float Temp)
 

Public Attributes

uint8 G
 
uint8 R
 
uint8 A
 

Private Member Functions

 FColor (const FLinearColor &LinearColor)
 

Detailed Description

Definition at line 376 of file Color.h.

Constructor & Destructor Documentation

◆ FColor() [1/5]

FORCEINLINE FColor::FColor ( )
inline

Definition at line 397 of file Color.h.

◆ FColor() [2/5]

FORCEINLINE FColor::FColor ( EForceInit )
inlineexplicit

Definition at line 398 of file Color.h.

◆ FColor() [3/5]

FORCEINLINE FColor::FColor ( uint8 InR,
uint8 InG,
uint8 InB,
uint8 InA = 255 )
inline

Definition at line 403 of file Color.h.

+ Here is the caller graph for this function:

◆ FColor() [4/5]

FORCEINLINE FColor::FColor ( uint32 InColor)
inlineexplicit

Definition at line 413 of file Color.h.

+ Here is the call graph for this function:

◆ FColor() [5/5]

FColor::FColor ( const FLinearColor & LinearColor)
explicitprivate

Please use .ToFColor(true) on FLinearColor if you wish to convert from FLinearColor to FColor, with proper sRGB conversion applied.

Note: Do not implement or make public. We don't want people needlessly and implicitly converting between FLinearColor and FColor. It's not a free conversion.

Member Function Documentation

◆ DWColor() [1/2]

uint32 & FColor::DWColor ( void )
inline

Definition at line 393 of file Color.h.

+ Here is the caller graph for this function:

◆ DWColor() [2/2]

const uint32 & FColor::DWColor ( void ) const
inline

Definition at line 394 of file Color.h.

+ Here is the caller graph for this function:

◆ FromHex()

static FColor FColor::FromHex ( const FString & HexString)
static

Creates a color value from the given hexadecimal string.

Supported formats are: RGB, RRGGBB, RRGGBBAA, #RGB, #RRGGBB, #RRGGBBAA

Parameters
HexString- The hexadecimal string.
Returns
The corresponding color value.
See also
ToHex

◆ FromRGBE()

FLinearColor FColor::FromRGBE ( ) const

◆ GCC_ALIGN()

uint8 B FColor::GCC_ALIGN ( 4 )

◆ MakeFromColorTemperature()

static FColor FColor::MakeFromColorTemperature ( float Temp)
static

Converts temperature in Kelvins of a black body radiator to RGB chromaticity.

◆ MakeRandomColor()

static FColor FColor::MakeRandomColor ( )
static

Makes a random but quite nice color.

◆ MakeRedToGreenColorFromScalar()

static FColor FColor::MakeRedToGreenColorFromScalar ( float Scalar)
static

Makes a color red->green with the passed in scalar (e.g. 0 is red, 1 is green)

◆ operator!=()

FORCEINLINE bool FColor::operator!= ( const FColor & C) const
inline

Definition at line 424 of file Color.h.

+ Here is the call graph for this function:

◆ operator+=()

FORCEINLINE void FColor::operator+= ( const FColor & C)
inline

Definition at line 429 of file Color.h.

+ Here is the call graph for this function:

◆ operator==()

FORCEINLINE bool FColor::operator== ( const FColor & C) const
inline

Definition at line 419 of file Color.h.

+ Here is the call graph for this function:

◆ ReinterpretAsLinear()

FORCEINLINE FLinearColor FColor::ReinterpretAsLinear ( ) const
inline

Reinterprets the color as a linear color.

Returns
The linear color representation.

Definition at line 479 of file Color.h.

+ Here is the call graph for this function:

◆ ToPackedABGR()

FORCEINLINE uint32 FColor::ToPackedABGR ( ) const
inline

Gets the color in a packed uint32 format packed in the order ABGR.

Definition at line 495 of file Color.h.

◆ ToPackedARGB()

FORCEINLINE uint32 FColor::ToPackedARGB ( ) const
inline

Gets the color in a packed uint32 format packed in the order ARGB.

Definition at line 487 of file Color.h.

◆ ToPackedBGRA()

FORCEINLINE uint32 FColor::ToPackedBGRA ( ) const
inline

Gets the color in a packed uint32 format packed in the order BGRA.

Definition at line 511 of file Color.h.

◆ ToPackedRGBA()

FORCEINLINE uint32 FColor::ToPackedRGBA ( ) const
inline

Gets the color in a packed uint32 format packed in the order RGBA.

Definition at line 503 of file Color.h.

◆ WithAlpha()

FColor FColor::WithAlpha ( uint8 Alpha) const
inline
Returns
a new FColor based of this color with the new alpha value. Usage: const FColor& MyColor = FColorList::Green.WithAlpha(128);

Definition at line 469 of file Color.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ A

uint8 FColor::A

Definition at line 387 of file Color.h.

◆ G

uint8 FColor::G

Definition at line 387 of file Color.h.

◆ R

uint8 FColor::R

Definition at line 387 of file Color.h.


The documentation for this struct was generated from the following file: