Interface color

Not exactly a critical issue, but I would like to change the color of each interface (and firewall zone) in luci. The interface element is "div.ifacebox-head". Maybe a dev knows? I think it might have to do something with a variable %=c%.

Interfaces follow the firewall zone, which gets its color from the hashed zone name. (It looks first like randomized, but as the random function is seeded with name-based hash, it is not actually random, I think. lan and wan have pre-defined colors.)

So, there is no actual config setting of the color for each zone.

Thanks for the info! I noticed that the color stay the same when changing the zone/interface name in /etc/config/firewall and network. If it's not too much trouble, do you know where the hashed names are stored, so I can try replacing the hashes with each other, thereby hopefully swapping color between zones?

To my knowledge they are not stored anywhere. It is always calculated.
https://github.com/openwrt/luci/search?q=get_color

just look at the source code... :wink:

Just a crude idea but if you want to tailor the colors, your best bet might be to just slightly editing & testing with zone names trying to achieve roughly the desired effect. Notice how changing the last char changes the color:
image

Hmm, I actually did that exact same search, but it didn't leave me any wiser. It seemed like they had to be stored somewhere, since I changed the name of my lan zone/interface, but it still got the same color.
But editing the zone name does get the job done! thanks again.