* ConTeXt color to text
@ 2012-09-03 16:59 Peter Rolf
2012-09-03 18:36 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rolf @ 2012-09-03 16:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
for a batch command (ImageMagick) I need to convert ConTeXt colors to a
text representation (e.g. rgb 'red' -> 'rgb(255,0,0)'; same for color
models cmyk and gray).
What is the best way to get (read only) access to the color channels of
a defined color?
Peter
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ConTeXt color to text
2012-09-03 16:59 ConTeXt color to text Peter Rolf
@ 2012-09-03 18:36 ` Hans Hagen
2012-09-04 9:18 ` Peter Rolf
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2012-09-03 18:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 3-9-2012 18:59, Peter Rolf wrote:
> Hi,
>
> for a batch command (ImageMagick) I need to convert ConTeXt colors to a
> text representation (e.g. rgb 'red' -> 'rgb(255,0,0)'; same for color
> models cmyk and gray).
> What is the best way to get (read only) access to the color channels of
> a defined color?
\colorcomponents{red}
\colorvalue{red}
in next beta:
\startluacode
-- inspect(attributes.colors.spec("red"))
-- table={
-- ["b"]=0,
-- ["c"]=0,
-- ["model"]="cmyk",
-- ["g"]=0,
-- ["k"]=0,
-- ["m"]=1,
-- ["r"]=1,
-- ["s"]=0.3,
-- ["y"]=1,
-- }
\stopluacode
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ConTeXt color to text
2012-09-03 18:36 ` Hans Hagen
@ 2012-09-04 9:18 ` Peter Rolf
0 siblings, 0 replies; 3+ messages in thread
From: Peter Rolf @ 2012-09-04 9:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 03.09.2012 20:36, schrieb Hans Hagen:
> On 3-9-2012 18:59, Peter Rolf wrote:
>> Hi,
>>
>> for a batch command (ImageMagick) I need to convert ConTeXt colors to a
>> text representation (e.g. rgb 'red' -> 'rgb(255,0,0)'; same for color
>> models cmyk and gray).
>> What is the best way to get (read only) access to the color channels of
>> a defined color?
>
> \colorcomponents{red}
> \colorvalue{red}
>
> in next beta:
>
> \startluacode
>
> -- inspect(attributes.colors.spec("red"))
>
Thanks Hans, very nice. Looking out for the next beta. I'll use the time
to check some other problems :-)
> -- table={
> -- ["b"]=0,
> -- ["c"]=0,
> -- ["model"]="cmyk",
> -- ["g"]=0,
> -- ["k"]=0,
> -- ["m"]=1,
> -- ["r"]=1,
> -- ["s"]=0.3,
> -- ["y"]=1,
> -- }
>
> \stopluacode
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -----------------------------------------------------------------
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-04 9:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-03 16:59 ConTeXt color to text Peter Rolf
2012-09-03 18:36 ` Hans Hagen
2012-09-04 9:18 ` Peter Rolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).