View difference between Paste ID: 1a1GUYd3 and ayHG7tyC
SHOW: | | - or go back to the newest paste.
1-
colorTable = {}
1+
2
i = 0
3-
term.clear()
3+
4-
term.setCursorPos(1,1)
4+
colorList = {DF0101, DF3A01, DF7401, DBA901, D7DF01, A5DF00, 74DF00, 3ADF00, 01DF01, 01DF3A, 01DF74, 01DFA5, 01DFD7,
5-
term.setTextColor(colors.lime)
5+
01A9DB, 0174DF, 013ADF, 0101DF, 3A01DF, 7401DF, A901DB, DF01D7, DF01A5, DF0174, DF013A}
6-
print("Opening rednet on side top")
6+
7
function sendColor(hex)
8
  rednet.broadcast(hex,"Lamp")
9-
function colorToHex(rgb)
9+
10-
  local hexadecimal = ''
10+
11-
	   for key, value in pairs(rgb) do
11+
12-
		    local hex = ''
12+
  if i > #colorList then i = 0 end
13-
		    while(value > 0)do
13+
  sendColor( colorList[i] )
14-
			     local index = math.fmod(value, 16) + 1
14+
15-
			     value = math.floor(value / 16)
15+