Hi,
Thanks for considering Aspose.
Well, the color(s) your are applying might not be present in the Standard Color Palette, so you have to add it first into the palette before setting it as a background color for conditional formattings. Since the Excel color palette has only 56 colors (0-55 indexed) on it, so if a color is not there, you will add the color to the palette replacing any existing color on a specified index position.
I think you may add some extra lines of code for your code:
e.g..,
........
Workbook workbook = new Workbook();
................
workbook.ChangePalette(Color.LightYellow,55);
workbook.ChangePalette(Color.FromArgb(255, 206, 206), 54);
workbook.ChangePalette(Color.FromArgb(206,255,206), 53);
.........
private void ApplyConditionalFormating(Aspose.Cells.Worksheet ws, int rowsToAdd)
{
Aspose.Cells.FormatConditions fcs = ws.ConditionalFormattings[ws.ConditionalFormattings.Add()];
CellArea ca = new CellArea();
ca.StartRow = 6;
ca.EndRow = 5 + rowsToAdd;
ca.StartColumn = 0;
ca.EndColumn = 0;
fcs.AddArea(ca);
Aspose.Cells.FormatCondition fc = fcs[fcs.AddCondition(FormatConditionType.CellValue, OperatorType.LessThan, "0.00", null)];
fc.Style.BackgroundColor = Color.FromArgb(255, 206, 206);
fc = fcs[fcs.AddCondition(FormatConditionType.CellValue, OperatorType.Between, "0.00", "0.039")];
fc.Style.BackgroundColor = Color.LightYellow;
fc = fcs[fcs.AddCondition(FormatConditionType.CellValue, OperatorType.GreaterOrEqual, "0.04", null)];
fc.Style.BackgroundColor = Color.FromArgb(206,255,206);
}
Thank you.