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

Free Support Forum - aspose.com

Issue in Cell foreground using Color.FromArgb


i am currently using

aspose.cell V

i am trying to put color in the cell using

cells1(0, 1).Style.ForegroundColor = Color.FromArgb(165, 200, 236)

cells1(0, 1).Style.Pattern = BackgroundType.Solid

i am also using following color code

165,200,236–blue light

228,237,246–blue lighter

204, 234, 175–greenlight


250,253,247–cream,but nothing works all gives a dark black background

but when i tried 250,0,0 it worked and gave a red background

i am also attaching a excel file to reference you the kind of output i am expecting

Kindly help

Thanks and Regards


Hi Zaid,

Thank you for considering Aspose.

Since you are applying custom colors to cells, so you need to add those custom colors to the MS Excel standard color palette before setting them. For your information, Ms Excel standard color palette has only 56 colors. The colors are indexed 0-55. Please check document topic:

If a color is not present on the palette, we have to add it to the palette, please check the following link for reference:

Thank You & Best Regards,