improving color stack in xdvipdfmx

Shunsaku Hirata shunsaku.hirata74 at
Wed Jun 24 12:54:21 CEST 2020

Hi Ulrike and Philip,

I'm currently working on extending dvipdfmx to support various color
models. (mostly finished but testing remains)

This is implemented just as an extension to the existing color special
of dvipdfmx, pdf:bcolor and pdf:ecolor, of the form:

  \special{pdf:bcolor @colorspace [1.0 0.4 0]}

where @colorspace is an object representing color space defined
somewhere before. (/DeviceCMYK and other device color model
names can also be used in place of object reference)

For example, to use ICCBased color space,

  \special{pdf:fstream @iccp (sRGB.icc) << /N 3 >>}
  \special{pdf:obj @colorspace_srgb [ /ICCBased @iccp ]}
  \special{pdf:bcolor @colorspace_srgb [0.0 1.0 0.0]}
  Hello World!

Here, ICC profile "sRGB.icc" is loaded. Other color models are also
supported. First define color space by pdf:obj and just refer to that
object in pdf:bolor.

Does this look OK?

Shunsaku Hirata

2020年6月11日(木) 0:18 Philip Taylor <P.Taylor at>:
> Excellent news, Shunsaku-san.  I hope very much that your other
> commitments will allow you to look at this again at some point in the
> not-too-distant future.
> /Philip Taylor/
> --------
> On 10/06/2020 15:17, Shunsaku Hirata wrote:
> > Currently I can't spend much time for this but technically having one
> > more stack for transparency (actually this could be ExtGState stack)
> > is relatively easy, and also, extending xdvipdfmx to support various
> > color models is definitely possible.

More information about the tex-live mailing list.