Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- lzColor v0.1 -- (C) LayZee 2013
- black = colors.black
- blue = colors.blue
- brown = colors.brown
- cyan = colors.cyan
- gray = colors.gray
- green = colors.green
- lightBlue = colors.lightBlue
- lightGray = colors.lightGray
- lime = colors.lime
- magenta = colors.magenta
- orange = colors.orange
- pink = colors.pink
- purple = colors.purple
- red = colors.red
- white = colors.white
- yellow = colors.yellow
- function newLine (x)
- local currentX, y = term.getCursorPos()
- x = x or 1
- term.setCursorPos(x, y + 1)
- end
- function defaultText ()
- term.setBackgroundColor(black)
- term.setTextColor(white)
- end
- function defaultSpace ()
- defaultText()
- term.write(" ")
- end
- function list ()
- if not term.isColor() then
- print("Colors are not supported. Build an Advanced Computer or Monitor.")
- return
- end
- term.write("black")
- defaultSpace()
- term.setBackgroundColor(blue)
- term.write("blue")
- defaultSpace()
- term.setBackgroundColor(brown)
- term.write("brown")
- defaultSpace()
- term.setBackgroundColor(cyan)
- term.write("cyan")
- defaultSpace()
- term.setBackgroundColor(gray)
- term.write("gray")
- newLine()
- term.setBackgroundColor(green)
- term.write("green")
- defaultSpace()
- term.setBackgroundColor(lightBlue)
- term.write("lightBlue")
- defaultSpace()
- term.setBackgroundColor(lightGray)
- term.write("lightGray")
- newLine()
- term.setBackgroundColor(lime)
- term.write("lime")
- defaultSpace()
- term.setBackgroundColor(magenta)
- term.write("magenta")
- defaultSpace()
- term.setBackgroundColor(orange)
- term.write("orange")
- defaultSpace()
- term.setBackgroundColor(pink)
- term.write("pink")
- newLine()
- term.setBackgroundColor(purple)
- term.write("purple")
- defaultSpace()
- term.setBackgroundColor(red)
- term.write("red")
- defaultSpace()
- term.setBackgroundColor(white)
- term.setTextColor(black)
- term.write("white")
- defaultSpace()
- term.setBackgroundColor(yellow)
- term.setTextColor(black)
- term.write("yellow")
- defaultText()
- newLine()
- end
- list()
Advertisement
Add Comment
Please, Sign In to add comment