Reputation: 4834
I want to use RGB colors in PDF in order to produce PDF/UA with enough contrast to meat Accessible standards for a page-number in orange. I have tried several options like the one in this question:
Add to the FOP.conf file in the
<renderer mime="application/pdf">
section
<filterList>
<output-profile>AdobeRGB1998.icc</output-profile>
</filterList>
An other one I have tried is the option to use
<fo:declarations>
<fo:color-profile src="url('AdobeRGB1998.icc')" color-profile-name="adobeRGB_98"/>
</fo:declarations>
And then reference it with color="rgb-icc(255,127,0,adobeRGB_98)"
The actual color I need looks like this:
And the color I now have in PDF is this:
I assume the last one is coveted to cymk and has not enough contrast according WCAG 2.0
We are using FOP version 2.10
When I use Xep with there option using a processing-instruction like this
<xsl:processing-instruction name="xep-pdf-icc-profile">url(AdobeRGB1998.icc)</xsl:processing-instruction>
The same pagenumber gives no validation errors.
I am using PAC 2024 to validate against PDF/UA.
Upvotes: 0
Views: 53
Reputation: 4834
As it turns out, that orange color will never have enough contrast. In the Xep-version the headers and footers were all marked as Artifacts and therefore not checked against contrast rules.
So by adding the @role='artifact' to the static-content parts like this example:
<fo:static-content flow-name="region-after-portrat" role="artifact" font-size="9pt">
<fo:block color="#FF8000">
<fo:page-number/>
</fo:block>
</fo:static-content>
no contrast-validation errors anymore.
Upvotes: 0
Reputation: 8068
It seems that you would need to add it to the FOP configuration. See:
https://xmlgraphics.apache.org/fop/trunk/configuration.html#pdf-renderer
Upvotes: 1