Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-02 Thread Hans Hagen

On 2-12-2010 5:02, Aditya Mahajan wrote:

On Wed, Dec 1, 2010 at 7:58 AM, Hans Hagenpra...@wxs.nl  wrote:

I could probably support

\definecolor[xxx][0.5(red,green)]
\definecolor[xxx][0.5(red)]

which looks better than this ! and is less likely to conflict with names as
abc! is a rather value color name.


That will be a nice feature to have (especially, if it can also be
used with \definedcolor)


You mean \colored[0.5(red)] ? That works ok.

-
  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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-02 Thread Aditya Mahajan

On Thu, 2 Dec 2010, Hans Hagen wrote:


On 2-12-2010 5:02, Aditya Mahajan wrote:

On Wed, Dec 1, 2010 at 7:58 AM, Hans Hagenpra...@wxs.nl  wrote:

I could probably support

\definecolor[xxx][0.5(red,green)]
\definecolor[xxx][0.5(red)]

which looks better than this ! and is less likely to conflict with names 
as

abc! is a rather value color name.


That will be a nice feature to have (especially, if it can also be
used with \definedcolor)


You mean \colored[0.5(red)] ? That works ok.


Indeed. That is what I meant. I did not know that the metapost like syntax 
worked for \colored.


Aditya
___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-02 Thread Hans Hagen

On 2-12-2010 12:01, Aditya Mahajan wrote:


Indeed. That is what I meant. I did not know that the metapost like
syntax worked for \colored.


\colored is just a shortcut to \definecolor

-
  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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-02 Thread Hans Hagen

On 2-12-2010 8:19, Alan BRASLAU wrote:


The next step would be to allow \color[0.5[red,green]] (or
\color[0.5(red,green)]), i.e. such syntax wherever a color can be used.


You can use \definecolor[mycolor][.5(red,green)] in the current beta, 
but I wonder if \color[0.5(red,green)] makes much sense as that would 
complicate (and definitely slow down) color switching. But, as Aditya 
pointer out you can use {\colored[0.5(green)]test} already. I don't want 
to get away too much from the principle of defining colors using names.


Hans

-
  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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Michael Murphy
On Sat, 2010-11-27 at 14:25 +0100, Hans Hagen wrote:
 On 27-11-2010 2:16, Mojca Miklavec wrote:
  On Sat, Nov 27, 2010 at 13:29, Hans Hagen wrote:
 
  \starttikzpicture
 \node[circle,ball color=darkred] (a) at (0,0,0) {$p_x$};
  \stoptikzpicture
 
  I made a workaround in that way, but it's still a bug ...
 
 I have no clue what the ! does apart from defining a color red at 10% 
 but I do know that context ignores it.
 
 Hans

The '!' is actually pretty neat, since it allows you to blend colors. By
default, tikz blends colors with white, so

red!10

means mix 10% red with 90% white. This has the advantage that I can take
any color, say

\definecolor[mycolor][r=0.42,g=1.,b=0.2]

and lighten it 50% by just using

mycolor!50

I can also blend two colors together, using

colorA!50!colorB

I'm also pretty sure that context didn't always ignore the exclamation
mark. Is there a way to reverse this behaviour?

PS I've tried using spot colors in context, but that doesn't seem to
work:

\definespotcolor[mycolor][red][p=.1]

-- 
Michael Murphy MPhys michael.mur...@uni-ulm.de

Institute für Quanteninformationsverarbeitung
Room N25/4409
Universität Ulm
Albert-Einstein-Allee 11
89081 Ulm Deutschland
tel +49 731 50 22824
fax +49 731 50 22839

www.uni-ulm.de/nawi/nawi-qiv.html

___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Hans Hagen

On 1-12-2010 1:36, Michael Murphy wrote:

On Sat, 2010-11-27 at 14:25 +0100, Hans Hagen wrote:

On 27-11-2010 2:16, Mojca Miklavec wrote:

On Sat, Nov 27, 2010 at 13:29, Hans Hagen wrote:


\starttikzpicture
\node[circle,ball color=darkred] (a) at (0,0,0) {$p_x$};
\stoptikzpicture


I made a workaround in that way, but it's still a bug ...


I have no clue what the ! does apart from defining a color red at 10%
but I do know that context ignores it.

Hans


The '!' is actually pretty neat, since it allows you to blend colors. By
default, tikz blends colors with white, so

red!10

means mix 10% red with 90% white. This has the advantage that I can take
any color, say

\definecolor[mycolor][r=0.42,g=1.,b=0.2]

and lighten it 50% by just using

mycolor!50

I can also blend two colors together, using

colorA!50!colorB

I'm also pretty sure that context didn't always ignore the exclamation
mark. Is there a way to reverse this behaviour?


I'm pretty sure that I never implemented something using a questionmark. 
However, we do have:


\definecolor[red-t]  [r=1,t=0.5,a=1]
\definecolor[green-t][g=1,t=0.5,a=1]
\defineintermediatecolor[mycolora][0.5,red,green]
\defineintermediatecolor[mycolorb][0.5,red-t,green-t]

\starttext
test {\mycolora OEPS} test
test {\mycolorb OEPS} test
\stoptext

I could probably support

\definecolor[xxx][0.5(red,green)]
\definecolor[xxx][0.5(red)]

which looks better than this ! and is less likely to conflict with names 
as abc! is a rather value color name.


Hans

-
  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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Michael Murphy
 I'm pretty sure that I never implemented something using a questionmark. 
 However, we do have:
 
 \definecolor[red-t]  [r=1,t=0.5,a=1]
 \definecolor[green-t][g=1,t=0.5,a=1]
 \defineintermediatecolor[mycolora][0.5,red,green]
 \defineintermediatecolor[mycolorb][0.5,red-t,green-t]
 
 \starttext
  test {\mycolora OEPS} test
  test {\mycolorb OEPS} test
 \stoptext
 
 I could probably support
 
 \definecolor[xxx][0.5(red,green)]
 \definecolor[xxx][0.5(red)]
 
 which looks better than this ! and is less likely to conflict with names 
 as abc! is a rather value color name.

OK, thanks. Last question then: is there a way to redefine standard
colors? Something like:

\redefinecolor[red][r=0,g=1,b=0]

-- 
Michael Murphy

___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Wolfgang Schuster

Am 01.12.2010 um 18:37 schrieb Michael Murphy:

 OK, thanks. Last question then: is there a way to redefine standard
 colors? Something like:
 
 \redefinecolor[red][r=0,g=1,b=0]

\starttext
\definecolor[test][r=1]\color[test]{red?}
\definecolor[test][g=1]\color[test]{red?}
\definecolor[test][b=1]\color[test]{red?}
\stoptext

Wolfgang

___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Aditya Mahajan
On Wed, Dec 1, 2010 at 7:58 AM, Hans Hagen pra...@wxs.nl wrote:
 I could probably support

 \definecolor[xxx][0.5(red,green)]
 \definecolor[xxx][0.5(red)]

 which looks better than this ! and is less likely to conflict with names as
 abc! is a rather value color name.

That will be a nice feature to have (especially, if it can also be
used with \definedcolor)

Aditya
___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-12-01 Thread Alan BRASLAU
On Wednesday 01 December 2010 13:58:23 Hans Hagen wrote:
 
 I could probably support
 
 \definecolor[xxx][0.5(red,green)]
 \definecolor[xxx][0.5(red)]
 
 which looks better than this ! and is less likely to conflict with names
 as abc! is a rather value color name.
 

Indeed, a favorite color is surprisepink!
\definecolor [roscolux51] [h=aaacd5] % Touch of color when white light is not 
desirable.
\definecolor [surprisepink!] [roscolux51]


The TiKz syntax red!50!green is short, sweet and rather strange. But the 
question remains on how to support full TiKz use under ConTeXt.


In Metapost, we have 0.5[red,green] (does this work with colors?). Would 
\definecolor[xxx][0.5[red,green]] be a better alternative? Is such a syntax 
possible? Would this be readable?

The next step would be to allow \color[0.5[red,green]] (or 
\color[0.5(red,green)]), i.e. such syntax wherever a color can be used.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-11-27 Thread Vedran Miletić
2010/11/26 Mojca Miklavec mojca.miklavec.li...@gmail.com

 Dear Till/Christian/Hans,

 The following is broken in ConTeXt MKIV (assuming the usage of patched
 TikZ to allow running it under MKIV at all), but works fine in ConTeXt
 MKII:

 \usemodule[tikz]
 \starttext

 \starttikzpicture
\node[circle,ball color=red!10] (a) at (0,0,0) {$p_x$};
 \stoptikzpicture

 \stoptext

 Mojca


Same here.

Regards,

Vedran Miletić
___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-11-27 Thread Hans Hagen

On 27-11-2010 12:04, Vedran Miletić wrote:

2010/11/26 Mojca Miklavecmojca.miklavec.li...@gmail.com


Dear Till/Christian/Hans,

The following is broken in ConTeXt MKIV (assuming the usage of patched
TikZ to allow running it under MKIV at all), but works fine in ConTeXt
MKII:

\usemodule[tikz]
\starttext

\starttikzpicture
\node[circle,ball color=red!10] (a) at (0,0,0) {$p_x$};
\stoptikzpicture

\stoptext

Mojca



Same here.


\starttikzpicture
   \node[circle,ball color=darkred] (a) at (0,0,0) {$p_x$};
\stoptikzpicture
\starttikzpicture
   \node[circle,ball color=red] (a) at (0,0,0) {$p_x$};
\stoptikzpicture
\definecolor[myred][r=.1]
\starttikzpicture
   \node[circle,ball color=myred] (a) at (0,0,0) {$p_x$};
\stoptikzpicture


-
  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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-11-27 Thread Mojca Miklavec
On Sat, Nov 27, 2010 at 13:29, Hans Hagen wrote:

 \starttikzpicture
   \node[circle,ball color=darkred] (a) at (0,0,0) {$p_x$};
 \stoptikzpicture

I made a workaround in that way, but it's still a bug ...

Mojca
___
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
___


Re: [NTG-context] bug: colors in TikZ/ConTeXt MKIV

2010-11-27 Thread Hans Hagen

On 27-11-2010 2:16, Mojca Miklavec wrote:

On Sat, Nov 27, 2010 at 13:29, Hans Hagen wrote:


\starttikzpicture
   \node[circle,ball color=darkred] (a) at (0,0,0) {$p_x$};
\stoptikzpicture


I made a workaround in that way, but it's still a bug ...


I have no clue what the ! does apart from defining a color red at 10% 
but I do know that context ignores it.


Hans

-
  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
___