You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/03/19 11:45:54 UTC
[Bug 54689] tint value is wrongly applied for several colors
https://issues.apache.org/bugzilla/show_bug.cgi?id=54689
Sven <sv...@ipsways.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Sven <sv...@ipsways.com> ---
Sorry, I mixed up some colors. Here's the corrected text:
For e.g. xlsx cell back ground color 11851260 - rgb 252/213/180 (visual basic
used: ActiveCell.Interior.Color) the tint value is correct and also getRgb()
delivers the correct value (byte array: [-9, -106, 70] - Hex: F79646 - theme 9)
without tint applied. But the value with the tint applied by getRgbWithTint()
(XSSFColor internal private method applyTint()) delivers rgb 251/212/180 (byte
array: [-5, -44, -76]).
Other color value to reproduce () is 14277081 - rgb 217/217/217 (theme - 0).
getRgb() delivers the correct value (byte array: [-1, -1, -1]) but
getRgbWithTint()
delivers byte array [0, 0, 0] even if the tint is -0.1499984740745262.
If I apply the tint using your method from 3.9 manually I even receive
216/216/216.
private static byte applyTint(int lum, double tint){
if(tint > 0){
return (byte)(lum * (1.0-tint) + (255 - 255 * (1.0-tint)));
} else if (tint < 0){
return (byte)(lum*(1+tint));
} else {
return (byte)lum;
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org