HexToRGBAFloat

From Onset Developer Wiki
Revision as of 14:21, 23 November 2019 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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