I am using jxl to read an Excel file. I need to make a decision, based on font color of a cell. The font color of the cell, I am getting is black, but the RGB value is (1, 0, 0).
When I compare it with Colour.BLACK it fails the == comparison because the RGB value of Colour.BLACK is (0,0,0).
Colour color = nameCell.getCellFormat().getFont().getColour();
if(color == Colour.BLACK) //fails this test
options = "0";
else
options = "1";
In the above code color.getDescription()
gives black color in description.
How shall I find that "black" is common in both objects Colour.BLACK
and nameCell.getCellFormat().getFont().getColour()
?