I finally found another way
https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_RhinoDoc_ActiveDoc.htm
private void RunScript(bool switcher, System.Drawing.Color colorTop, System.Drawing.Color colorBottom, ref object A)
{
if (switcher == true)
{
Rhino.RhinoDoc.ActiveDoc.RenderSettings.BackgroundColorTop = colorTop;
Rhino.RhinoDoc.ActiveDoc.RenderSettings.BackgroundColorBottom = colorBottom;
}
else
{
Rhino.RhinoDoc.ActiveDoc.RenderSettings.BackgroundColorTop = System.Drawing.Color.FromArgb(255,255,255,255);
Rhino.RhinoDoc.ActiveDoc.RenderSettings.BackgroundColorBottom = System.Drawing.Color.FromArgb(255,255,255,255);
}
I hope this will help some people