Excel.ChangePalette method

I have the following code:

excel.ChangePalette(Color.FromArgb(200,224,240),53);

chart.Title.TextFont.Color = Color.FromArgb(200,224,240);

I expect this to give me a light blue colour. But instead, it gives me some shade of orange, similar to 255, 102, 0. What am I doing wrong? I am not understanding the connection between the palette index and the R/G/B values.

Sorry. This problem is caused by a small bug. Please try this attached v3.7.1.1.

Was my code correct ?

I think I am still getting inconsistent behaviour with the colours, but I will test it again thoroughly.

Why is it required to change the palette before assigning a colour to any of the chart elements?

Am I right in saying that ChangePalette replaces the colour in the given palette index, e.g. 53 with the colour represented by the RGB combination ? If I go to Tools/Options/Color in Excel, I see 56 colours (0-55). How are they numbered - starting with the first row and going across, or starting with the first column and going down ?

Your code is correct.

Please check

Aspose.Cells API Reference pages.

If your color is already in the palette, you don't need to change the palette. You can use Excel.IsColorInPalette method to check it.