SHARE
TWEET

Untitled

a guest Jun 19th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function returnRGB(valeur)
  2.     local t = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F" }
  3.     local r, g, b
  4.  
  5.     r = (16 * premier chiffre hexa (exemple : si F alors = 16) + (1 * second chiffre hexa (exemple : si 4 alors = 5)
  6.     g = (16 * premier chiffre hexa) + (1 * second chiffre hexa)
  7.     b = (16 * premier chiffre hexa) + (1 * second chiffre hexa)
  8.    
  9.     return r.." - "..g.." - "..b
  10. end
  11.  
  12. while true do
  13.     screen:clear()
  14.    
  15.     screen:print(10, 10, returnRGB("FF0000"), Color.new(255, 255, 255))
  16.    
  17.     screen.waitVblankStart()
  18.     screen.flip()
  19. end
RAW Paste Data
Top