Advertisement
guitarplayer616

ColorsConvert Decimal2Paint

Jan 24th, 2017
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local buffer = {}
  2. shell.run("clr")
  3.  
  4. for i,v in pairs(colors) do
  5.     if type(v) == "number" then
  6.  
  7.         local x = math.log(v) / math.log(2)
  8.         if x > 9 then
  9.             x = string.char(x+87)
  10.         end
  11.         --print(i," ",x)
  12.         --print(x)
  13.         loadstring(i.."="..x)()
  14.     end
  15. end
  16.  
  17. print(gray)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement