Set Color - Setting all nodes in a parent node to same color (SOLVED)

I am creating a tabbed menu option and want to change the color of active and inactive tabs when a user clicks on them however when using the gui.set_color function it seems to be setting it for each of the tabs.

I have the follow tab table

chat_tabs = {
    		system = { enabled = true, url = "/hud#chat_tab_system", node = gui.get_node("chat_tab_system")},
    		corporation = { enabled = false, url = "/hud#chat_tab_corporation", node = gui.get_node("chat_tab_corporation")}
 }

With the follow function to cycle and disable/set_color.

function chat_set_active_tab(tab)
    	for k,v in pairs(chat_tabs) do
    		if k == tab then
    			chat_tabs[k].enabled = true
    			gui.set_color(chat_tabs[k].node, vmath.vector4(0, 0.039, 0,1))
    		else
    			chat_tabs[k].enabled = false
    			gui.set_color(chat_tabs[k].node, vmath.vector4(0,0,0,1))
    		end
    	end
end

On load it looks like this:

tabs_onload

When I click the system tab I see this:

tabs_system_click

I am looking for the result to be “Gray” as my active and “Black” as my inactive (these are sandbox colors as I am the system/logic dev not the artist :slight_smile: )

You’re using multiple gui scenes right?

Where is the chat_tabs table located? Is it global? And the chat_set_active_tab is a global function (ie no local keyword).

Set a breakpoint and do some debugging.

It was working, my conversion of RGBA to Vector colors was wrong so it was changing colors but it was only a slightly different black that it was not noticeable.