Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function returnRGB(valeur)
- local t = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" }
- local r, g, b
- r = (16 * premier chiffre hexa (exemple : si F alors = 16) + (1 * second chiffre hexa (exemple : si 4 alors = 5)
- g = (16 * premier chiffre hexa) + (1 * second chiffre hexa)
- b = (16 * premier chiffre hexa) + (1 * second chiffre hexa)
- return r.." - "..g.." - "..b
- end
- while true do
- screen:clear()
- screen:print(10, 10, returnRGB("FF0000"), Color.new(255, 255, 255))
- screen.waitVblankStart()
- screen.flip()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement