Steps: 1. Create xlsx doc. 2. Set fill color for cell with theme colors from 3 or 4 columns (brown or blue tints). 3. Call cell.getFillForegroundXSSFColor().getRgbWithTint(). Actual: incorrect color (color is similar but not exactly the same) Expected: correct color
Is it a problem with what goes into the file, or with how we return it? Since a .xlsx file is a zip of xml files, any chance you could take a look inside and see what value actually got stored by excel? Are we returning that, or are we getting that wrong?
Problem in applying tint to rgb. Algorithm you use applies tint to the brown and blue colors incorrectly.
The support for tint came from a user contributed patch from bug #48432 Are you able to identify the logic we should correct it to?
Unfortunately I am not able yet to fix it
Are you able to figure out what the values should be easily? If so, could you pick say half a dozen colours, and then apply three different tint to each? From that, work out what the values should be, as compared to what they are, and we might have a good shot at spotting what's wrong with the current logic.
(There is some information from Microsoft on how to do the tinting and shading at http://social.msdn.microsoft.com/Forums/en/oxmlsdk/thread/f6d26f2c-114f-4a0d-8bca-a27442aec4d0 but we'll want a few sets of numbers for a unit test no matter what!)
Created attachment 26689 [details] Excel-POI theme colors converting Please see attachment
Do you know what the text in the excel cells is supposed to be showing? When I use an image editor to check the colours in the png, then I find that the POI colours match the hex strings in them. However, the excel cell colours are not the same as the hex string. For example, D6 says 8A8149, but my image editor says that the colour is 948b54. Equally, K7 says E16207 but my image editor claims it's e46d0a FWIW, H7 reads 6A8832 but my image editor says it's 75923c. It's POI equivalent says 748C42, and my image editor says 748c42 so agrees again, so it's not just the "incorrect" ones where something odd is going on.
This may have been fixed in r1126696. Can you verify if this bug exists in the latest version of POI? Related: bug 51236 and bug 53274
Probably fixed as per previous comments. Please reopen with evidence if you still think there are issues.