[Xy-pic] Default color model
Ross Moore
ross.moore at mq.edu.au
Tue Aug 3 22:05:57 CEST 2010
On 04/08/2010, at 5:47 AM, Ross Moore <ross.moore at mq.edu.au> wrote:
> Also whether '0 setgray' gives black or white.
>
>
>> that I have to change? And is
>>
>> /xycolor{0 setgray}def
>
> Yes, this forces a single color.
>
> Another way is to define setrgbcolor to throw away 2 components and invert the 3rd.
> E.g. /setrgbcolor{pop pop 1 sub neg}def
Oops. 0 setgray is black, right?
Then this should be
/setrgbcolor{pop pop setgray}def
> Or take a weighted sum of the components to convert to grayscale
> /setrgbcolor{1 sub .6 mul neg
> exch 1 sub .15 mul neg add
> exch 1 sub .25 mul neg add
> }def
And this should be
/setrgbcolor{1 sub neg .6 mul
exch 1 sub neg .15 mul add
exch 1 sub neg .25 mul add
1 sub neg setgray}def
>
> And it is good to have this problem and solution in the Xy-pic mailing list archives.
>
Sorry for the error.
Cheers,
Ross
More information about the xy-pic
mailing list