I am using openpyxl to read excel file. I want to get cell color from "xlsx" file. I tried to get color so:
wb = load_workbook('Test.xlsx', data_only=True)
sh = wb[Sheet1]
sh['A1'].fill.start_color.index #Green Color
I get "11L", but i need to get rgb color, how i can do it?
Looks like the sheet is using the built-on colour index. The mapping for these is in the source of
openpyxl.styles.color
11L corresponds to 0000FF00 (hexadecimal) for which the rgb tuple would be green (0,255,0).
I got color from cell so: