Thank you for your answer GŁnter (sorry for not answering myself, but it seems I wasn't receiving emails from the list correctly). I tried the script you uploaded to the sandbox, and it worked but it has a little bug: it expects all the lines in the CSS stylesheet to have a comment:

† ††print "% " + l.split('*')[1]

but if it isn't the case, it just breaks. Apart from this detail I got a nice coloured PDF. Thank you again!