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

Free Support Forum - aspose.com

Darker/Lighter Settings for SchemeColor

When using a SchemeColor as a Solid Fill in Aspose.Slides, how to make it darker and lighter like in PowerPoint?

image.png (4.8 KB)

In Aspose.Cells, there is an attribute called Tint | Aspose.Cells for .NET API Reference

In Aspose.Words, there is a similar attribute called TintAndShade | Aspose.Words for .NET API Reference for Theme colors

Thank you for posting your question.

With Aspose.Slides, you can change tint and shade settings for SchemeColor of a shape in PowerPoint presentations like this:

shape1.FillFormat.SolidFillColor.ColorTransform.Add(ColorTransformOperation.Tint, 0.4f);
shape2.FillFormat.SolidFillColor.ColorTransform.Add(ColorTransformOperation.Shade, 0.8f);

API Reference: ColorTransformOperation enumeration

@Andrey_Potapov Thank you for pointing me to the ColorTransform options.

Tint & Shade are actually not the options that match the behavior of PowerPoint.

Fortunately, there are other color transform options that match PowerPoint’s behavior.

For example, for an Accent 1, Lighter 80%, use the following transform options:

shape.FillFormat.SolidFillColor.SchemeColor = SchemeColor.Accent1;
shape.FillFormat.SolidFillColor.ColorTransform.Add(ColorTransformOperation.MultiplyLuminance, 0.2f);
shape.FillFormat.SolidFillColor.ColorTransform.Add(ColorTransformOperation.AddLuminance, 0.8f);

Similarly, for Accent 1, Darker 25, use the following:

shape.FillFormat.SolidFillColor.SchemeColor = SchemeColor.Accent1;
shape.FillFormat.SolidFillColor.ColorTransform.Add(ColorTransformOperation.MultiplyLuminance, 0.75f);

We are glad to know that you have found the solution yourself. Thank you for the information.