colors.lua
local t = require("terminal")
t.initialize{
displaybackup = true,
filehandle = io.stdout,
}
t.clear()
t.cursor_push(1,1)
t.textpush{
fg = "white",
brightness = "dim",
}
t.print("Hello dim white World!")
t.textpush{
fg = "white",
bg = "blue",
brightness = "normal",
}
t.print("Hello white on blue World!")
t.textpush{
fg = "red",
bg = "black",
brightness = "bright",
}
t.print("Hello bright red World!")
t.textpop()
t.print("Hello white on blue World! (again)")
t.textpop()
t.print("Hello dim white World! (again)")
t.textpop()
t.write("Press any key, or wait 5 seconds...")
t.flush()
t.readansi(5)
t.shutdown()
print("done!")