XML technologies / XSL-FO / Reference / Functions in XSL-FO / rgb

(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Recommendation section: 5.10.2

Category: 5.10.2 Color Functions

The rgb function returns a specific color from the RGB color spectrum.

Values

color rgb(numeric, numeric)

XSL-FO version: 1.0

Support:

Conformance level

Antenna House

FOP

RenderX XEP

Altsoft XML2PDF

Compart DocBridge

Extended

Y

Y

Y

?

Y

XSL-FO example:

<fo:root>
<fo:layout-master-set>
<fo:simple-page-master page-height="297mm" page-width="210mm" margin-top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="main">
<fo:region-body margin-bottom="10mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="main">
<fo:flow flow-name="xsl-region-body">
<fo:block color="rgb(0,0,0)">
rgb(0,0,0)
</fo:block>
<fo:block color="rgb(0,255,255)">
rgb(0,255,255)
</fo:block>
<fo:block color="rgb(255,0,0)">
rgb(255,0,0)
</fo:block>
<fo:block color="rgb(0,0,255)">
rgb(0,0,255)
</fo:block>
<fo:block color="rgb(0,255,0)">
rgb(0,255,0)
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>

Download the examples

In the output:

back to top