PostScript provides different color models. They are available to
PyX by different color classes, which just pass the colors down to
the PostScript level. This implies, that there are no conversion
routines between different color models available. However, some color
model conversion routines are included in Python's standard library in
the module colorsym. Furthermore also the comparison of
colors within a color model is not supported, but might be added in
future versions at least for checking color identity and for ordering
gray colors.
There is a class for each of the supported color models, namely
gray, rgb, cmyk, and hsb. The constructors
take variables appropriate for the color model. Additionally, a list of
named colors is given in appendix A.