1st arg can't be coerced to java.awt.Color

I’m using the Tag Historian from the ignition exchange in a project. I’m trying to automatically load up a list of tags, and I’ve been successful, except for when I try to set the color on a pen via scripting like this:

color = system.gui.color(255,0,0)

I get this when I try to run, and the chart won’t show the pens, but the pens and their respective colors seem to show okay. So it’s like the Easy Chart component in the template doesn’t like the color, but the Power Table is fine with it.

  File "<extension-method configureCell>", line 40, in configureCell
TypeError: setSelectedColor(): 1st arg can't be coerced to java.awt.Color

When I print a line from a dataset that does work, the color shows as this: java.awt.Color[r=255,g=0,b=0], but if I try to put that in the script editor, it doesn’t like it.