getRandomColor
عشوائي Hex وظيفة تقوم بارجاع لون
The function returns random hex color
Syntax :
string getRandomColor( )
Code :
function getRandomColor( )
local t = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}
local c = "#"
for k=1,6 do c = c..t[math.random(#t)] end
return c
end
Return :
Return a random hex color
Example :
print("The 20 random color :")
for k=1,20 do print(k, getRandomColor( )) end