camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.81k stars 449 forks source link

Feature request: Get background color of cell #391

Open stefreak opened 11 months ago

stefreak commented 11 months ago

I love camelot, it's been surprisingly reliable and it has been a big quality of life improvement for me 👏

I am dealing with a table where the text in the cell has a different meaning depending on the background color of the cell.

Feature request: Expose the background color of the cell.

Example how the camelot API could expose this:

tables = camelot.read_pdf("foo.pdf")
text_data = df = tables[0].df
background_color_data = tables[0].background_colors.df

Is this completely out of scope or would you accept a PR with this feature?