Set Background Gradient Colors from Python Rhinocommon

Hello, and thanks for any assistance.
I’m trying to set the colors of the two-color gradient background of a Rhino model from a Python component in Grasshopper. I’ve managed to change the fill mode to Gradient2Color, but do not see how to access/set the colors of the gradient. Simplified code below. Any guidance is much appreciated.

mode = Rhino.Display.DisplayModeDescription.GetDisplayMode(id)
mode.DisplayAttributes.FillMode = Rhino.Display.DisplayPipelineAttributes.FrameBufferFillMode.Gradient2Color
Rhino.Display.DisplayModeDescription.UpdateDisplayMode(mode)

Hi @ksteinfeld,

There isn’t enough exposed on RhinoCommon do to this.

I’ve added a request to the pile.

https://mcneel.myjetbrains.com/youtrack/issue/RH-53234

For now, the best you can do is script the -GradientView command.

– Dale