FromColor: Difference between revisions
Jump to navigation
Jump to search
.WhiteBlue (talk | contribs) (Created page with "__NOTOC__ {{Server client function}} This function converts the hexadecimal numbers of the specified colors ==Syntax== <syntaxhighlight lang="lua"> int fromColor ( color ) <...") |
.WhiteBlue (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Useful Function}} | ||
This function converts the hexadecimal numbers of the specified colors | This function converts the hexadecimal numbers of the specified colors | ||
Revision as of 19:21, 25 September 2018
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 red = bitExtract(color, 0, 8) local green = bitExtract(color, 8, 8) local blue = bitExtract(color, 16, 8) local alpha = bitExtract(color, 24, 8) return { red, green, blue, alpha } end end
See Also
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace