From 9f3047997385c0b876fa9c14fec14fced7ef4d5a Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Sat, 9 Mar 2019 17:20:14 -0500 Subject: [PATCH] Update ccbn.lua --- ccbn.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ccbn.lua b/ccbn.lua index 1e0a962..3b3e1a0 100644 --- a/ccbn.lua +++ b/ccbn.lua @@ -19,6 +19,15 @@ local stage = { } -- ripped from NFTE +colorSwap = function(image, text, back) + local output = {{},{},{}} + for y = 1, #image[1] do + output[1][y] = image[1][y] + output[2][y] = image[2][y]:gsub(".", text) + output[3][y] = image[3][y]:gsub(".", back or text) + end + return output +end local makeRectangle = function(width, height, char, text, back) local output = {{},{},{}} for y = 1, height do