From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38033 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: color expansion at runtime Date: Mon, 17 Dec 2007 09:49:42 +0100 Message-ID: <47663826.3090509@wxs.nl> References: <4762B608.1010107@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197881462 30609 80.91.229.12 (17 Dec 2007 08:51:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Dec 2007 08:51:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 17 09:51:13 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1J4Bgv-0001YP-3R for gctc-ntg-context-518@m.gmane.org; Mon, 17 Dec 2007 09:51:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 528581FBAA; Mon, 17 Dec 2007 09:50:54 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08404-09-2; Mon, 17 Dec 2007 09:50:18 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DC5A01FBC1; Mon, 17 Dec 2007 09:50:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 82F301FBC1 for ; Mon, 17 Dec 2007 09:50:16 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 11673-06-14 for ; Mon, 17 Dec 2007 09:49:44 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 1F02C1FBAA for ; Mon, 17 Dec 2007 09:49:44 +0100 (CET) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 1383 for ; Mon, 17 Dec 2007 09:49:44 +0100 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <4762B608.1010107@gmx.net> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:38033 Archived-At: Peter Rolf wrote: > Hi, > > I desperately need runtime defined colors (state dependent) for my > macros. The macros are used with different graphic styles, which is the > reason why I want to avoid any style dependent part inside them. > > To give you an example. I need something like this > > \color[{\StateDependentColor[stateA=green,stateC=blue,whatever=yellow,...]}] > > If flag 'stateA' is true at runtime, then color 'green' is used (and so > on; order is significant). this is what color palets are for .. grep a bit on the base path; it's even in some manuals if you use colorpalets, then you can change the state of many colors at once with one command > I have written such a macro, but sadly it crashes when used inside > \color or \definecolor. Tried to debug it, but this is my first > experience with the trace commands (probably not the best example to > start with). Sigh, still so much to learn.. :) > > Any hints are welcome. > > Regards, 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________