RC
Rajadurai C
Syncfusion Team
July 17, 2009 07:15 AM UTC
Hi Philip,
Thanks for your interest in Syncfusion Products.
The XlsIO has a color palette where it has the collection of colors holded in ExcelKnownColors enumerator. These colors are the defined colors to be displayed in the Excel Sheet. If the exported color is not in the ExcelKnownColor then it will take the closest of the RGB values which is available in it.
For Example,
If we have one color r1, g1, b1 and another color r2, g2, b2 then we evaluate difference as (r1-r2)*(r1-r2) + (g1-g2)*(g1-g2)+(b1-b2)*(b1-b2). The smaller this values is, the closer colors are. Hence the exported color is not providing the same color in the Excel as it is in the Grid if the color value supplied through FromArgb funtion not exactly matches the known color.
Regards,
Rajadurai