From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80525 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Consistent Colors Date: Tue, 29 Jan 2013 18:10:35 +0100 Message-ID: References: <51078438.5080009@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359479458 10176 80.91.229.3 (29 Jan 2013 17:10:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 17:10:58 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 29 18:11:12 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U0EiB-0001Vg-AR for gctc-ntg-context-518@m.gmane.org; Tue, 29 Jan 2013 18:11:07 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 370F510222; Tue, 29 Jan 2013 18:10:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vxtBkX87v1Cs; Tue, 29 Jan 2013 18:10:43 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 8D48B101F5; Tue, 29 Jan 2013 18:10:43 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55F0F101F5 for ; Tue, 29 Jan 2013 18:10:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5U0tO0YLPsDw for ; Tue, 29 Jan 2013 18:10:37 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 88157101E7 for ; Tue, 29 Jan 2013 18:10:37 +0100 (CET) Original-Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com [209.85.214.45]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0THAanH022331 for ; Tue, 29 Jan 2013 18:10:36 +0100 Original-Received: by mail-bk0-f45.google.com with SMTP id i18so404888bkv.4 for ; Tue, 29 Jan 2013 09:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=0FFrxjrvvBn8bCVsAfmCYr0V2mbG5OIG5z0LbHg4SKk=; b=oUA2ddaRVtIgCdryo4qZwchapL6va+Ixui71Ma5s/Mbbv6gWzROVA1vjYpFQN4+1j9 lFuDVYrdFcvNwhwDVYAO4Q/QBrdzVARetPjNxkbbSrdFWoBceqZQpdtxeadCWd6CuI6E 1YSHOg/oq26gIf8PNKDduoWSePJOciONhR+U+OrXYNrzsSvTP7xWedXOcSg2GabN0q3k etXpuZNzPRvRJ+z8qqFHVQTebBwAPhRmIoC7uvh2TBIfJHc71QRX6XQ1CsPEdXzlLL6W zLpfAWUATmb+tmxAwAVxMymfAxT1tRgc1oeJo9VuX3xVwBlba1hf86Ci6q8DI3AYztwF FhyA== X-Received: by 10.204.149.143 with SMTP id t15mr568568bkv.45.1359479436255; Tue, 29 Jan 2013 09:10:36 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4dbe6672.pool.mediaWays.net. [77.190.102.114]) by mx.google.com with ESMTPS id z5sm9692154bkv.11.2013.01.29.09.10.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 09:10:35 -0800 (PST) In-Reply-To: <51078438.5080009@gmail.com> X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RIRRaAhM - fbc5abf185f6 - 20130129 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80525 Archived-At: Am 29.01.2013 um 09:11 schrieb Devendra Ghate : > I have been going through the concepts underlying pallet. > > I would like to define three basic colors in RGB. Then use various shades > and tints of these basic three colors through out the document. > > Now the algorithm for getting various shades for RGB scheme is: > > Darker shades: > Multiply each component by 1/4, 1/2, 3/4, etc. > of its previous value, depending on how dark the > color should be. > > Lighter tints: > Calculate (1 - previous value), multiply that by > 1/4, 1/2, 3/4, etc. and add that to the previous value. > > What I would like is a macro that is fed a color name > and should define 3 shades above and below it. \definecolor[test-0][r=0.8,g=0.2,b=0.4] \definecolor[test-1][1.00(test-0)] \definecolor[test-2][0.75(test-0)] \definecolor[test-3][0.50(test-0)] \definecolor[test-4][0.25(test-0)] \starttext \startlines \color[test-1]{1.00} \color[test-2]{0.75} \color[test-3]{0.50} \color[test-4]{0.25} \stoplines \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 ___________________________________________________________________________________