FromColor
From Multi Theft Auto: Wiki
This function converts the hexadecimal numbers of the specified colors
Syntax
int fromColor ( color )
Required Arguments
- color: Values representing colors.
Returns
Returns an array containing colors (red, green, blue)
Example
Click to collapse [-]
ClientThe following code inverts the tocolor function.
function fromColor(color) if color then local blue = bitExtract(color, 0, 8) local green = bitExtract(color, 8, 8) local red = bitExtract(color, 16, 8) local alpha = bitExtract(color, 24, 8) return { red, green, blue, alpha } end end local color = tocolor(255, 0, 0, 255) print(fromColor(color))
See Also
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
- debugSleep
- decodeString
- encodeString
- fromJSON
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getServerConfigSetting
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setServerConfigSetting
- setTimer
- sha256
- split
- teaDecode
- teaEncode