* nested colors problem
@ 2017-01-20 20:42 Peter Rolf
2017-01-20 20:54 ` Alan Braslau
2017-01-21 10:11 ` Hans Hagen
0 siblings, 2 replies; 7+ messages in thread
From: Peter Rolf @ 2017-01-20 20:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
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.
Best wishes, Peter
[-- Attachment #2: color.mkiv --]
[-- Type: text/plain, Size: 264 bytes --]
\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
[-- Attachment #3: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-20 20:42 nested colors problem Peter Rolf
@ 2017-01-20 20:54 ` Alan Braslau
2017-01-20 21:26 ` Peter Rolf
2017-01-21 10:11 ` Hans Hagen
1 sibling, 1 reply; 7+ messages in thread
From: Alan Braslau @ 2017-01-20 20:54 UTC (permalink / raw)
To: Peter Rolf; +Cc: mailing list for ConTeXt users
On Fri, 20 Jan 2017 21:42:16 +0100
Peter Rolf <indiego@gmx.net> wrote:
> Maybe intended behaviour, maybe a bug. Donno.
Not a bug: color and transparency are not the same thing.
Alan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-20 20:54 ` Alan Braslau
@ 2017-01-20 21:26 ` Peter Rolf
2017-01-20 22:12 ` Henning Hraban Ramm
0 siblings, 1 reply; 7+ messages in thread
From: Peter Rolf @ 2017-01-20 21:26 UTC (permalink / raw)
To: Alan Braslau, mailing list for ConTeXt users
Am 20.01.2017 um 21:54 schrieb Alan Braslau:
> On Fri, 20 Jan 2017 21:42:16 +0100
> Peter Rolf <indiego@gmx.net> wrote:
>
>> Maybe intended behaviour, maybe a bug. Donno.
>
> Not a bug: color and transparency are not the same thing.
>
True, but you define and use them at once. How to separate them then?
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-20 21:26 ` Peter Rolf
@ 2017-01-20 22:12 ` Henning Hraban Ramm
2017-01-20 23:48 ` Peter Rolf
0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2017-01-20 22:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 2017-01-20 um 22:26 schrieb Peter Rolf <indiego@gmx.net>:
> Am 20.01.2017 um 21:54 schrieb Alan Braslau:
>> On Fri, 20 Jan 2017 21:42:16 +0100
>> Peter Rolf <indiego@gmx.net> wrote:
>>
>>> Maybe intended behaviour, maybe a bug. Donno.
>>
>> Not a bug: color and transparency are not the same thing.
>>
>
> True, but you define and use them at once. How to separate them then?
Did you look at http://wiki.contextgarden.net/Color/Transparency ?
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-20 22:12 ` Henning Hraban Ramm
@ 2017-01-20 23:48 ` Peter Rolf
0 siblings, 0 replies; 7+ messages in thread
From: Peter Rolf @ 2017-01-20 23:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 20.01.2017 um 23:12 schrieb Henning Hraban Ramm:
> Am 2017-01-20 um 22:26 schrieb Peter Rolf <indiego@gmx.net>:
>
>> Am 20.01.2017 um 21:54 schrieb Alan Braslau:
>>> On Fri, 20 Jan 2017 21:42:16 +0100
>>> Peter Rolf <indiego@gmx.net> wrote:
>>>
>>>> Maybe intended behaviour, maybe a bug. Donno.
>>>
>>> Not a bug: color and transparency are not the same thing.
>>>
>>
>> True, but you define and use them at once. How to separate them then?
>
> Did you look at http://wiki.contextgarden.net/Color/Transparency ?
>
Thanks for the pointer.
The simple solution is just to also define the parameters 't=1,a=1' for
the opaque color. Should be mentioned in the docs somewhere and sorry
for the noise ;)
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-20 20:42 nested colors problem Peter Rolf
2017-01-20 20:54 ` Alan Braslau
@ 2017-01-21 10:11 ` Hans Hagen
2017-01-21 13:37 ` Peter Rolf
1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2017-01-21 10:11 UTC (permalink / raw)
To: ntg-context
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
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: nested colors problem
2017-01-21 10:11 ` Hans Hagen
@ 2017-01-21 13:37 ` Peter Rolf
0 siblings, 0 replies; 7+ messages in thread
From: Peter Rolf @ 2017-01-21 13:37 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-21 13:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20 20:42 nested colors problem 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 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).