Posted: Thu Feb 22, 2018 9:28 am Post subject: rgb translate to hex using trackbar [help]
how to make argb translate to hex
coz i wanna make pointer value is hex
example
255 = FF
i can create it but manually
it will be tons of line
how to make it simple?
function RGBToHex(red, green, blue)
if(red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) then
return nil
end
return string.format("0x%.2X%.2X%.2X", red,green,blue)
end
-- test :
print(RGBToHex(255, 255, 255)) --- = 0xFFFFFF
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum