From 9a004e57bda609be06e6dca062ef72f65e39c9f2 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Mon, 24 Apr 2017 23:44:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B8=D0=B4=D1=80,=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=82=D0=B5=D1=81=D1=82=D0=B8=D0=BB=20=D0=B4=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/color.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/color.lua b/lib/color.lua index 58cad06c..aa4643a6 100755 --- a/lib/color.lua +++ b/lib/color.lua @@ -105,13 +105,15 @@ local openComputersPalette = {} for r = 0x0, 0xFF, 0xFF / 5 do for g = 0x0, 0xFF, 0xFF / 7 do for b = 0x0, 0xFF, 0xFF / 4 do - table.insert(openComputersPalette, color.RGBtoHEX(r, math.floor(g + 0,5), math.floor(b + 0.5))) + table.insert(openComputersPalette, color.RGBToHEX(r, math.floor(g + 0,5), math.floor(b + 0.5))) end end end -for gr = 0x1, 0x10 do - table.insert(openComputersPalette, gr * 0xF0F0F) + +for g = 0x1, 0x10 do + table.insert(openComputersPalette, g * 0xF0F0F) end + table.sort(openComputersPalette) function color.to8Bit(color24Bit)