How to change background Color of Popup Menu

we are trying to change the background color of Popup menu by using the following script:

import system
	if system.tag.readBlocking(['[System]Client/System/SystemFlags'])[0].value > 3:

		from javax.swing import JMenuItem
		from javax.swing.border import EmptyBorder
		def doMenuItem1(event):
			import system
			system.gui.messageBox("Report 1 selected")
		def doMenuItem2(event):
			import system
			system.gui.messageBox("Report 2 selected")
		def doMenuItem3(event):
			import system
			system.gui.messageBox("Report 3 selected")
		import system
		menu = system.gui.createPopupMenu([],[])
		menuitem1 =  JMenuItem ("Report 1",actionPerformed=doMenuItem1)
		menuitem1.selectionBackground = system.gui.color(255,0,0)
		menuitem1.foreground = system.gui.color(0,0,0)
		menuitem2 =  JMenuItem ("Report 2",actionPerformed=doMenuItem2)
		menuitem2.background = system.gui.color(255,0,0)
		menuitem2.foreground = system.gui.color(0,0,0)
		menuitem3 =  JMenuItem ("Report 3",actionPerformed=doMenuItem3)
		menuitem3.background = system.gui.color(255,0,0)
		menuitem3.foreground = system.gui.color(0,0,0)
		menu.setPopupSize(150, 25*3)

This code has been written on Power Table’s onPopupTrigger Extension function using Ignition v8.0.7

we were trying to set the background to red but we still get the default color

There is a bug ticket for this, but it not have a high priority…as it’s only a GUI concern

I guess we can’t do anything about it for now.
but it would be helpful if we are able to solve it soon as we have to use this in one of our projects.

Thank you for the reply @mazeyrat