Change color of line through scripting

I have an SVG that I imported to my project. This shape has an outline that I would like to change the width and color of based on a custom property. I can change the width no problem, but how would I change the color of the line using this script?

I know that I can use the style customer to change the color based off a custom property. However, I would like to implement this to dozens of other templates that I’m using. Copy/pasting a script is faster than me copy/pasting a script AND setting up the Style Customizer.

image

logger = system.util.getLogger("Valve Template")
startLogging = system.tag.read("[Client]InfoDebug").value
# manual mode has been set. 
if event.propertyName == "manual":
	if event.source.manual == True:
		from java.awt import BasicStroke
		lineWidth = 2
		if startLogging: logger.info("Property: %s" % event.propertyName)
		event.source.setStrokeStyle(BasicStroke(lineWidth))
	if event.source.manual == False:
		from java.awt import BasicStroke
		lineWidth = 0.582
		if startLogging: logger.info("Property: %s" % event.propertyName)
		event.source.setStrokeStyle(BasicStroke(lineWidth))
		
from java.awt import Color
event.source.setStrokePaint(Color.white)
event.source.setFillPaint(Color.gray)

Some combination of the StrokePaint and FillPaint should work.