local ansi = {} function ansi.start_document (_) return "" end function ansi.end_document () return "" end function ansi.start_table () return "" end function ansi.end_table () return "" end function ansi.start_row () return "" end function ansi.end_row () return "\n" end function ansi.label (name) return ("%5s "):format(name) end function ansi.spot () return " " end local colours = { [0] = "238", "22", "28", "34", "46", } function ansi.cell (level) return ("\27[38;5;%dm"):format(colours[level]) .. "◼" .. "\27[0m" end return ansi