ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > XSL FO > General > Color and background color

Rendered image | PDF document
Use attribute color to set color and attribute background-color to set background color.


Source
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
     <fo:layout-master-set>
          <fo:simple-page-master master-name="simple">
               <fo:region-body/>
          </fo:simple-page-master>
     </fo:layout-master-set>
     <fo:page-sequence master-reference="simple">
          <fo:flow flow-name="xsl-region-body">
               <fo:block color="yellow" background-color="blue">Yellow text on a blue background.</fo:block>
          </fo:flow>
     </fo:page-sequence>
</fo:root>