| Author |
RGB color combination table? (using 0 to 1 values)
|
|
| bayxarea-usenet@yahoo.com 2005-03-10, 8:58 pm |
| I am writing a watermark insertion script (in perl) to combine a given
PS watermark into the user provided PS file. I want to provide the
option (as an argument to my script) for the user to specify the RGB
combination to set the color of the font.
I want to provide a list in my readme file for this script to explain
to the user how to get the color they want - however all of the lists I
find on the web list the values in 0 - 255 format. The postscript
values are 0.0 - 1.0 (I think) - so I would like to find a table that
lists the color combinations this way.
Or should I just explain them to convert from 255 to 1?
Thanks,
John
| |
| Roger Willcocks 2005-03-10, 8:58 pm |
|
<bayxarea-usenet@yahoo.com> wrote in message
news:1110498781.140787.192060@l41g2000cwc.googlegroups.com...
> I am writing a watermark insertion script (in perl) to combine a given
> PS watermark into the user provided PS file. I want to provide the
> option (as an argument to my script) for the user to specify the RGB
> combination to set the color of the font.
>
> I want to provide a list in my readme file for this script to explain
> to the user how to get the color they want - however all of the lists I
> find on the web list the values in 0 - 255 format. The postscript
> values are 0.0 - 1.0 (I think) - so I would like to find a table that
> lists the color combinations this way.
>
> Or should I just explain them to convert from 255 to 1?
Why not have the PS watermark code do the conversion?
/R 123 def
/G 255 def
/B 101 def
/setfontcolor { R 255 div G 255 div B 255 div setrgbcolor } def
--
Roger
| |
| Mark Carroll 2005-03-11, 4:00 am |
| In article <1110498781.140787.192060@l41g2000cwc.googlegroups.com>,
<bayxarea-usenet@yahoo.com> wrote:
(snip)
>Or should I just explain them to convert from 255 to 1?
Yes, they just have to divide by 255. Maybe even write them a Perl
script or something to translate the table to the right format, or
define for them a special setcolor operator that does the division for
them.
-- Mark
| |
| Roger Willcocks 2005-03-12, 8:57 pm |
|
<bayxarea-usenet@yahoo.com> wrote in message
news:1110498781.140787.192060@l41g2000cwc.googlegroups.com...
> I am writing a watermark insertion script (in perl) to combine a given
> PS watermark into the user provided PS file. I want to provide the
> option (as an argument to my script) for the user to specify the RGB
> combination to set the color of the font.
>
> I want to provide a list in my readme file for this script to explain
> to the user how to get the color they want - however all of the lists I
> find on the web list the values in 0 - 255 format. The postscript
> values are 0.0 - 1.0 (I think) - so I would like to find a table that
> lists the color combinations this way.
>
> Or should I just explain them to convert from 255 to 1?
Why not have the PS watermark code do the conversion?
/R 123 def
/G 255 def
/B 101 def
/setfontcolor { R 255 div G 255 div B 255 div setrgbcolor } def
--
Roger
|
|
|
|