LeshaInc 0 Posted June 3, 2016 Share Posted June 3, 2016 Rainbow Sometimes you need to write colored strings in terminal. It isn't easy in some cases, so i wrote library for colored output. DownloadYou can download this library using this command: pastebin get J9nAzYai Also this library can be found in my oppm repository, just navigate to rainbow folder. Example local color = require("rainbow") local buf = color.buffer{ colors_ext = { foreground = { cool = 0x735184 } }, patterns = { progress = function (self, info, now, max) return self.fg_white(info) .. " " .. self.fg_red("[" .. now .. "/" .. max .. "]") .. "\n" .. self.bg_black(self.fg_white("")) end } } local mycoolcolor = buf.colorize(0xDEAD00, true) buf(true, "progress", mycoolcolor("i am progress"), buf.fg_red(30), buf.fg_cool(100)) buf("i am text\n") color.core( "i am ", color.core.bg_red("core"), color.core.fg_white(color.core.bg_black(" text\n")) ) Documentation ... will be here soon. Just wait. Enjoy! Quote Link to post Share on other sites