Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1844

Re: How to give colour as parameter to ghostscript

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!news.panservice.it!feed.xsnews.nl!border02.ams.xsnews.nl!feeder02.ams.xsnews.nl!feeder03.ams.xsnews.nl!frontend-F10-16.ams.news.kpn.nl
From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.postscript
Subject Re: How to give colour as parameter to ghostscript
Organization Decebal Computing
References <87y4zqsj9a.fsf@Equus.Decebal.nl>
X-Face "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR<J%a^F2lh4[N~Yz4 nSp#c+aQo1b5=?HcNEkQ7QzF<])O3X4MDL/AYjys&*mt>,v+Pti8=Vi/Z"g^?b"E
X-Homepage http://www.decebal.nl/
Date Mon, 31 Mar 2014 14:47:36 +0200
Message-ID <87txaesffb.fsf@Equus.Decebal.nl> (permalink)
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
Cancel-Lock sha1:7wWI55LcFrTtBNZ91cjHfA5YxCw=
MIME-Version 1.0
Content-Type text/plain
Lines 47
NNTP-Posting-Host 77.171.42.144
X-Trace 1396270799 news.kpn.nl 1975 77.171.42.144@kpn/77.171.42.144:52404
Xref csiph.com comp.lang.postscript:1844

Show key headers only | View raw


Op Monday 31 Mar 2014 13:24 CEST schreef Cecil Westerhof:

> I have defined the following:
> /colors <<
> .
> .
> .
> /colorNavy                { 0      0      0.5  }
> /colorNavyBlue            { 0.14   0.14   0.56 }
> /colorNeonBlue            { 0.3    0.3    1    }
> .
> .
> .
> /colorOrange              { 1      0.5    0    } % coral
> /colorOrangeRed           { 1      0.14   0    }
> .
> .
> .
> /colorRed                 { 1      0      0    }
> .
> .
> .
> /colorWhite               { 1      1      1    }
> /colorYellow              { 1      1      0    }
> /colorYellowGreen         { 0.6    0.8    0.2  }
>>> def
> colors begin
>
> Normally I do something like the following:
> /backgroundColor  {colorYellow} def
>
> But I want to give the colour as a parameter to ghostscript:
> -sbackgroundColor=colorNavy
>
> What do I need to do in the postscript script to get the right value
> in backgroundColor?

Found it. I call the script with:
    -sbackground=color" background

And in the script I use:
    /backgroundColor  {background cvx exec} def

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.postscript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to give colour as parameter to ghostscript Cecil Westerhof <Cecil@decebal.nl> - 2014-03-31 13:24 +0200
  Re: How to give colour as parameter to ghostscript ken <ken@spamcop.net> - 2014-03-31 14:00 +0100
  Re: How to give colour as parameter to ghostscript Cecil Westerhof <Cecil@decebal.nl> - 2014-03-31 14:47 +0200

csiph-web