I’m using the following piece of Python script to generate a colored output:
from pcbnew import *
filename=sys.argv[1]
board = LoadBoard(filename)
pctl = PLOT_CONTROLLER(board)
popt = pctl.GetPlotOptions()
pctl.SetLayer(F_Cu)
pctl.SetColorMode(True)
popt.SetColor(COLOR4D(0.050, 0.050, 0.050, 0.1)) # <= Somewhat undocumented!
pctl.OpenPlotfile("layer-F_Cu", PLOT_FORMAT_SVG, "Top Layer")
pctl.PlotLayer()
and expecting a SVG output painted by a color (possibly kind of gray) but definitely other than black, but result is exactly black.
How can I change the output color of a specific layer?