Advertisement
JackMacWindows

colors

Jul 29th, 2017
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. function colors.fileToPaint(c)
  2.   local color = term.getBackgroundColor()
  3.   if c == "0" then color = colors.white
  4.   elseif c == "1" then color = colors.orange
  5.   elseif c == "2" then color = colors.magenta
  6.   elseif c == "3" then color = colors.lightBlue
  7.   elseif c == "4" then color = colors.yellow
  8.   elseif c == "5" then color = colors.lime
  9.   elseif c == "6" then color = colors.pink
  10.   elseif c == "7" then color = colors.gray
  11.   elseif c == "8" then color = colors.lightGray
  12.   elseif c == "9" then color = colors.cyan
  13.   elseif c == "a" then color = colors.purple
  14.   elseif c == "b" then color = colors.blue
  15.   elseif c == "c" then color = colors.brown
  16.   elseif c == "d" then color = colors.green
  17.   elseif c == "e" then color = colors.red
  18.   elseif c == "f" then color = colors.black end
  19.   return color
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement