guiLabelGetColor | Multi Theft Auto: Wiki Skip to content

guiLabelGetColor

Client-side
Server-side
Shared

Pair: guiLabelSetColor

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function gets the color of a label.

Syntax

guiLabelGetColor ( )

Code Examples

client
local pLabel = guiCreateLabel( 0.5, 0.5, 0.5, 0.5, 'Text', true )
guiLabelSetColor( pLabel, math.random( 0, 255 ), math.random( 0, 255 ), math.random( 0, 255 ) )
addCommandHandler( 'get_color_label',
function()
local iR, iG, iB = guiLabelGetColor( pLabel )
outputChatBox( ( 'Label color is r = %d, g = %d, b = %d' ):format( iR, iG, iB ) )
end
)

See Also

GUI Functions