ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: nested colors problem
Date: Sat, 21 Jan 2017 14:37:18 +0100	[thread overview]
Message-ID: <84104625-54d4-2ecf-04bc-775cfb6f7ec8@gmx.net> (raw)
In-Reply-To: <ef76bfd3-f3ea-5786-ade2-09053918d9a2@wxs.nl>

Am 21.01.2017 um 11:11 schrieb Hans Hagen:
> On 1/20/2017 9:42 PM, Peter Rolf wrote:
>> Hi,
>>
>> the nested color inherits the transparency from it's surrounding color.
>>
>> \definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent
>> \definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque
>>
>> \starttext
>>   \startcolor[colA]
>>     \definedfont[SansBold at 96bp]Titanfall\,
>>     \startcolor[colB]2\stopcolor
>>   \stopcolor
>> \stoptext
>>
>>
>> ConTeXt version: 2014.11.26 21:43
>>
>> Maybe intended behaviour, maybe a bug. Donno.
> 
> colorspace, color and transparency are different axis
> 
> \definecolor[colX] [r=.5]
> \definecolor[colY] [t=.5,a=1]
> 
> \starttext
> 
> \startbuffer
> \dontleavehmode
> \blackrule[color=colX,width=3cm]\hskip-1.5cm
> \blackrule[color=colY,width=3cm]
> \stopbuffer
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \setupcolors[rgb=no]
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \setupcolors[rgb=no,cmyk=no]
> 
> \getbuffer \par \color[colY]{\getbuffer}
> 
> \stoptext
> 
> it just happens that coming from mkii colors can have transparencies
> 
> as Alan says: they are different things (also in metafun)
> 
> \startMPcode
>     fill fullcircle scaled 4cm
>         withcolor "red" ;
>     fill fullcircle scaled 3cm
>         withtransparency (1,0.5) ;
>     fill fullcircle scaled 2cm
>         withcolor "green"
>         withtransparency (1,0.5) ;
> \stopMPcode
> 
> 

Thanks for the clarification. Stupid me :D


___________________________________________________________________________________
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:[~2017-01-21 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 20:42 Peter Rolf
2017-01-20 20:54 ` Alan Braslau
2017-01-20 21:26   ` Peter Rolf
2017-01-20 22:12     ` Henning Hraban Ramm
2017-01-20 23:48       ` Peter Rolf
2017-01-21 10:11 ` Hans Hagen
2017-01-21 13:37   ` Peter Rolf [this message]

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=84104625-54d4-2ecf-04bc-775cfb6f7ec8@gmx.net \
    --to=indiego@gmx.net \
    --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).