HEX Game.exe i guess, is conditioned by item type in some cases, and if applied also by energy, *not 100% sure. You can check it on the shared source.
Example Cap, Armor, Boots, Gloves:
Item Energy 0000 - 1000 : gray
Item Energy 1000 - 3000 : WHITE
Item Energy 3000 - 5000 : GREEN
Item Energy 5000 - 7000 : PURPLE
Item Energy 7000 - ???? : RED
File: UIItemCommand.cpp
* you can also change this within an item instance