We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Set shape color from ARGB

Hi

I want to set custom colors for shapes (fill and line). I was hoping that code along the following lines would work, but it doesn’t.

shape.FillFormat.SolidFillColor.Color = Color.FromArgb(250, 50, 187, 50);

How can I set custom ARGB colours on shapes?

Hi Steven,


I have observed the requirement shared by you. You need to set the fill type as well. Please try using the following sample code to serve the purpose.

shape.FillFormat.FillType=FillType.Solid;
shape.FillFormat.SolidFillColor.Color = Color.FromArgb(250, 50, 187, 50);

Many Thanks,