HexToRGBAFloat

From Onset Developer Wiki
HexToRGBAFloat

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Converts Hex color value into RGBA float. Useful for FLinearColor.

Syntax

HexToRGBAFloat(HexColor)

Parameters

  • HexColor
    Hex color in float format.

Return Value

  • R, G, B, A values between 0.0 and 1.0

Example

function convertToFLinearColor(hex)
    local r, g, b, a = HexToRGBAFloat(hex)
    return FLinearColor(r, g, b, a)
end

See also