Yes, it seems confusing. However, background color property is only used, when there are two colors. For example, if you are filling the cell with two color gradient fill, then first color will be specified via foreground color and second will be specified via background color.
Also, when fill color is not solid fill, then background color property is also used.
Besides that when you format pivot table cells, background color property is used.
In short, Foreground Color is only used when fill type is SOLID.
e.g.
The following line specifies that the fill type is Solid
OK - I understand how they are used now but in my opinion, a more logical and intuitive way of doing it would have been to use a single method that took two arguments, one of which is optional. ie
setBackgroundColor(Color.getRed()); // this would be the equivalent of setForgroundColor(Color.getRed())
setBackgroundColor(Color.getRed(), Color.getYellow()); // this would be the equivalent of setForgroundColor(Color.getRed()) and setBackgroundColor(Color.getYellow())
Thanks for your suggestions. We will look into them and employ them if they are feasible for us. We have logged them in our database for analysis. Once, we will have some resolution or other news for you, we will update you asap.
This issue has been logged as
CELLSJAVA-42565 - Foreground Color vs Background Color vs Fill Color - Use a single method that takes two arguments
The issues you have found earlier (filed as CELLSJAVA-42565) have been fixed in this update. This message was posted using BugNotificationTool from <a href=“https://#{request.env[“HTTPS_HOST”]}”>Downloads module by Amjad_Sahi
The issues you have found earlier (filed as CELLSJAVA-42565) have been fixed in Aspose.Cells for Java 18.4. Please also see the document for your reference: