poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50786] XSSFColor.getRgb() returns null for Excel 97-2003 indexed colors
Date Wed, 16 Feb 2011 10:56:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50786

--- Comment #3 from andrei <andrei.astrouski@gmail.com> 2011-02-16 05:56:04 EST ---
styles.xml
<fgColor indexed="42"/>
Color is stored as indexed.

Possible solution:

XSSFColor color = ..;
short colorIndex = color.getIndexed();
HSSFColor indexedColor = HSSFColor.getIndexHash().get(colorIndex);
byte[] rgb = indexedColor.getTriplet();

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


Mime
View raw message