ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. fromcolor

Function

fromcolor

Server and clientUtilitiesTrilogy Hub only

Splits a colour stored as one number (e.g. from tocolor) into r, g, b, a components - the inverse of tocolor.

Syntax

int, int, int, int fromcolor(int color)

Arguments

colorint
ARGB colour.

Returns

r, g, b, a.

Example

local r, g, b, a = fromcolor(tocolor(255, 128, 0, 200))

See also