[reportlab-users] CMYK coloured <font> within a Paragraph
Robin Becker
robin at reportlab.com
Sat Feb 23 05:20:59 EST 2008
Stevens, Ian wrote:
> I'm using the <font> tag to introduce a coloured symbol in a different
> font within a paragraph. Is there a way that I can specify that colour
> as CMYK? Currently the colour is RGB:
>
> eg.
> colour = CMYKColor(0, 0.6, 0.94, 0)
> style = ParagraphStyle('style', fontName='FontOne', textColor=black)
> [...]
> p = Paragraph('Test para <font face="FontTwo" color="%s" size="7"> >
> </font> with colour' % (colour.hexval(), style)
>
> This is causing problems with our printer as everything else is CMYK,
> including the same colour used elsewhere, and the symbol in the
> paragraph is RGB.
>
> thanks,
> Ian.
>
......
reportlab.lib.colors.toColor is used to parse the colour values so you
can use
<font color='CMYKColor(0,0.6,0.94,0)'>CMYKColor</font>
etc etc
--
Robin Becker
More information about the reportlab-users
mailing list