Grasshopper Gradient from SDK

Does anybody know how to make a Gradient component
from c# , I need to make a custom one ready made trough a c# component

gerry

Thanks but I don’t want a new gradient tool, I just want to add a gradient on the canvas
and customize its colors and range (if possible)

I don’t see the gradient component in the sdk so I suppose its not exposed

gd

private void RunScript(bool run, ref object A)
{
  if(!run) return;
  var grad = new GH_GradientControl();
  grad.CreateAttributes();
  grad.Attributes.Pivot = new System.Drawing.PointF(100, 100);
  GrasshopperDocument.AddObject(grad, false);
}

Gradient.gh (2.2 KB)

1 Like

Thanks, that is what I was searching for

gerry