ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: colorizing pictures
Date: Tue, 19 Mar 2019 13:23:51 +0100	[thread overview]
Message-ID: <c7829a4a-e3ec-8a60-97d3-b82e21141612@xs4all.nl> (raw)
In-Reply-To: <CEED9884-6A19-4229-96B0-B75DB6A21CCD@fiee.net>

On 3/18/2019 7:45 PM, Henning Hraban Ramm wrote:
> \externalfigure has a "color" parameter. It used to be possible to 
> colorize greyscale pictures with that, but it doesn’t work any more:
> 
> %%%
> \setupcolors[state=start]
> \setupexternalfigures[
>      location={local,global,default},
> ]
> 
> \starttext
> 
> \externalfigure[img/minidodo_g][width=.3\textwidth,color=red] % greyscale
> \externalfigure[img/minidodo_b][width=.3\textwidth,color=green] % bitmap
> \externalfigure[cow][width=.3\textwidth,color=blue] % vector
> 
> \stoptext

from one of the manuals ...


\starttext

\definecolor [my-blue]   [c=1,m=.38,y=0,k=.64] % pms 2965 uncoated m
\definecolor [my-yellow] [c=0,m=.28,y=1,k=.06] % pms  124 uncoated m

\definespotcolor [my-blue-100]   [my-blue]   [p=1]
\definespotcolor [my-yellow-100] [my-yellow] [p=1]
\definespotcolor [my-blue-50]    [my-blue]   [p=.5]
\definespotcolor [my-yellow-50]  [my-yellow] [p=.5]

\definemultitonecolor [my-mix] [my-blue=.12,my-yellow=.28] 
[c=.1,m=.1,y=.3,k=.1]

\starttabulate[|T||]
\NC my-blue       \NC \blackrule[color=my-blue, 
width=.6\textwidth,height=5mm] \NC \NR
\NC my-blue-50    \NC \blackrule[color=my-blue-50, 
width=.6\textwidth,height=5mm] \NC \NR
\NC my-blue-100   \NC \blackrule[color=my-blue-100, 
width=.6\textwidth,height=5mm] \NC \NR
\NC my-yellow     \NC \blackrule[color=my-yellow, 
width=.6\textwidth,height=5mm] \NC \NR
\NC my-yellow-50  \NC \blackrule[color=my-yellow-50, 
width=.6\textwidth,height=5mm] \NC \NR
\NC my-yellow-100 \NC 
\blackrule[color=my-yellow-100,width=.6\textwidth,height=5mm] \NC \NR
\NC my-mix        \NC \blackrule[color=my-mix, 
width=.6\textwidth,height=5mm] \NC \NR
\stoptabulate

\useexternalfigure[demofig][mill.png][object=no,width=.2\textwidth]

\startcombination[4*1]
   {\externalfigure[demofig]}                      {no color}
   {\externalfigure[demofig][color=my-mix]}        {indexed duotone}
   {\externalfigure[demofig][color=my-blue-100]}   {spot color}
   {\externalfigure[demofig][color=my-yellow-100]} {spot color}
\stopcombination

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2019-03-19 12:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 18:45 Henning Hraban Ramm
2019-03-19 12:23 ` Hans Hagen [this message]
2019-03-19 15:23   ` Henning Hraban Ramm
2019-03-19 15:34     ` Hans Hagen
2019-03-19 17:54       ` Henning Hraban Ramm
2019-03-19 22:23         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7829a4a-e3ec-8a60-97d3-b82e21141612@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).