Nice question from a reader, thought it was time for more colour in my life ;-)
What is the list of colors (colours) supported by BI Publisher (BIP / XML Publisher / XMLP) for cell highlighting?
Firstly, how can we specify a color, say "red":
- By Name, e.g. red
- By Hex value, e.g. #FF0000
- By Decimal value, e.g. rgb(255,0,0)
- By HSL (Hue, Saturation, Light) value e.g. hsl(30,100,50). NB: Couldn't get this one to work.
Secondly, where can we specify a value?
- As the regular RTF borders & shading for a cell
- Coded as an XSL attribute
So back to the question, what is the list of colors? Well, that depends on how you specify the color, and what your target output format is.
If you want to specify by name, I think the list is as follows (HTML4 color list):
Black = #000000 | Green = #008000 | ||
Silver = #C0C0C0 | Lime = #00FF00 | ||
Gray = #808080 | Olive = #808000 | ||
White = #FFFFFF | Yellow = #FFFF00 | ||
Maroon = #800000 | Navy = #000080 | ||
Red = #FF0000 | Blue = #0000FF | ||
Purple = #800080 | Teal = #008080 | ||
Fuchsia = #FF00FF | Aqua = #00FFFF |
If you specify the color by Hex or Decimal value, then your list is pretty big, but bear in mind that the device the user is using to view your output, plus your target output format could be limiting your effective range of colours, hence the short list of colours and the existence of "safe" colors.
Okay, I like trying out these sorts of things, so gave it a go with my Active Users - BIP template.
So threw a few colors at the RTF template:
Where the form fields (grey highlight) are as follows:
YELLOW | Safe | <?if:../../USER_NAME ="GROBERTS"?><xsl:attribute xdofo:ctx="block" name="background-color">yellow</xsl:attribute><?end if?> |
6600CC | Not safe | <xsl:attribute xdofo:ctx="block" name="background-color">#6600cc</xsl:attribute> |
rgb(210,105,30) chocolate | Not safe | <xsl:attribute xdofo:ctx="block" name="background-color">rgb(210,105,30)</xsl:attribute> |
hsl(30,100,50) orange | Not safe | <xsl:attribute xdofo:ctx="block" name="background-color">hsl(30,100%,50%)</xsl:attribute> |
How did it turn out? Heres a shot of the PDF output, nice! ... except for the HSL
Here's a shot of the RTF output, similar to PDF.
Here's a shot of the Excel output ... not so close to the chocolate and purple I was hoping for.
So there you have it. If you care alot about your colours, test them out before your release them.
Happy highlighting!
PS. If you're looking to do any templating with BI Publisher, read the Oracle XML Publisher Report Designers Guide Release 12. It's well worth it!