I am using POI 3.8 version and trying to read the background color of a cell in an excel sheet (XLS). Ideally I wanted to copy this cell with styles to a different sheet. When I did a cloneFrom(..) method, its not copying the correct colors to the target sheet.
When I tried to read the cell's background color separately, I am not getting the correct RGB value. If I could get the correct RGB value I can create a custom palette and set the same to the target sheet's cell.
Is there a correct way of reading the background color from a cell?
I have tried the following
cell.getCellStyle().getFillBackgroundColor()
cell.getCellStyle().getFillBackgroundColorColor().getTriplet()
The above line should give me RGB value of 159/200/222, but is giving me an incorrect value of 51/204/204.
Could someone please help on the same. I have already checked this forum for all possible answers and still could not get what I want.