**python** unable to read the background color in python

I am working on requirement on spreadsheet in python scripting.

I have a spreadsheet containing cell values and with background color.

I am able to read the value value but unable to get the background color of that particular cell.

Actually my requirement is to read the cell value along with the background color and display the same in html table.

Here I am able to display the cell value but not with background color.

Could you please suggest the required library which suits my requiremnet with some example code.

import openpyxl
wb = openpyxl.load_workbook(filename = r'empty.xlsx')
sheet_ranges = wb['range']
print sheet_ranges['D18'].value 

From the documentation I think your going to need to look at:

sheet_ranges['D18'].style.fill.fill_type
sheet_ranges['D18'].style.fill.start_color.index

fill_type might be something like openpyxl.style.Fill.FILL_SOLID and You may find it quite difficult to map all the different fill styles (Solid, 75% Grey, etc) to HTML backgrounds.

You will also have to convert the color indexes to RGB values.