From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108404 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Two questions about color in MetaFun Date: Thu, 13 Aug 2020 17:48:59 -0500 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5777065887104966853==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10497"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 14 00:49:36 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6M2R-0002cl-AO for gctc-ntg-context-518@m.gmane-mx.org; Fri, 14 Aug 2020 00:49:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1A92616468E; Fri, 14 Aug 2020 00:49:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uf10SdNMihrA; Fri, 14 Aug 2020 00:49:12 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 73DAA1646A7; Fri, 14 Aug 2020 00:49:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A36481646A7 for ; Fri, 14 Aug 2020 00:49:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hmh1mY7MhCA7 for ; Fri, 14 Aug 2020 00:49:11 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.50; helo=mail-wr1-f50.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1BA8716468E for ; Fri, 14 Aug 2020 00:49:10 +0200 (CEST) Original-Received: by mail-wr1-f50.google.com with SMTP id c15so6679209wrs.11 for ; Thu, 13 Aug 2020 15:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1yKNckeXSMh39+/E4dHi8Bi7TmTQ0NfKHBoZ0qTrYTo=; b=ohKjYhUiKPWep09x/FxPzqiTC7HcJR93o6zhMN8mtX3oXYB6TSJQMPJVs4/YOp5No/ jZpH3nSWyw58jbjE1oc45gncaCB8SEpUbg64C+prK80LdJikCa71rp+06Z9Rxm1AfHWh BfbyMnGqWgbwWMGj9yDe7tLxFjFxCrTmF+ghCOf5D1vegpyFVspIVCtzlmGJBDAcZofb X1A2qF/Fm0H+I7HEYwLsXMaS53tdeDAtx4b6LHIuOLEPmVFkh+kRDP96NN8Wl5v4qU9z j9Fv8T6ORtMecpECWI1+yRrcHMg46dxFuX6dp2KUzE7sVsYhMV5ciMbWSV8kbJ2/mu4o /4fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1yKNckeXSMh39+/E4dHi8Bi7TmTQ0NfKHBoZ0qTrYTo=; b=p8DzaZo4qYa4P+KNs/F1cKGALyA8D8HZGAFDyPhXWgm43bfEVRIy3GX8pBvJgscp8K +V4B6RKtcg8zhWUl2z3QimDicEBIGrAC6SwfTWnfQadqeqQtEy88evAdGkDSXrFN5X12 /q9zxuukhzC/YBHOa0F5b4Sy0tRa6Q5wRP0/7Scx0Hud+538oPlv3oolViBO8F6iJnOA METn0RSq2egswaBU0iQWewHT9NiVZvfn+ELeUNYWZX/q9cfVKl/j2hFmtfIimgz75iSc tXMzzjfwjUfLuBK5/pRflfhaRf0YwJgmM3kSPQIVmcUDUQLu/6jk0ip3VEZxN48NOZJo hS9Q== X-Gm-Message-State: AOAM532383BwwN4XjgQkC9FPmUCxlUUQXSHUX1aLM/Ru9m/Cz3CyuquU gX3jQYhw2lydWHPGGs77L7n+SZ3fcq1VKUlYLjQBT6Cktkg= X-Google-Smtp-Source: ABdhPJyaBgKJ6tfckEEQNYrY/9Hloipqs+8D8NP5LZ0HsWWjqdlBzVgsdK2efH0kDgOtL95Lwge5yXrabbi8blC3Af0= X-Received: by 2002:adf:f485:: with SMTP id l5mr5534504wro.147.1597358950322; Thu, 13 Aug 2020 15:49:10 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:108404 Archived-At: --===============5777065887104966853== Content-Type: multipart/alternative; boundary="000000000000d0159705acca1c89" --000000000000d0159705acca1c89 Content-Type: text/plain; charset="UTF-8" Hi, list! I have two questions concerning MetaFun: 1st: What is the correct way to pass a ConTeXt named color (e.g. xwi's "maroon") to MetaFun. Using (with \usecolors[xwi] loaded in the preamble): withcolor maroon does not work. I could copy-paste definitions from ConTeXt sources and do e.g. \definecolor [maroon][r=.690196,g=.188235,b=.376471] but it is unfeasible for complete color schemes. So, is there a better way to do it? 2nd: I was trying to do some stuff for my girlfriend using ConTeXt and I tried to randomize colors in MetaFun using normaldeviate. However, something interesting happens. The following: \setuplayout[width=middle] \setuppagenumbering[state=stop] \setuppapersize[A10,landscape][A10,landscape] \starttext \startuseMPgraphic{cornystuff} draw outlinetext.f ("\framedtext[frame=off,width=fit,align=middle]{I love you \\ \CONTEXT}") %\CONTEXT is not my girlfriend, it's just for the example (withcolor (normaldeviate,normaldeviate,normaldeviate) withpen pencircle scaled 1/5) scaled 1 ; \stopuseMPgraphic \dorecurse{20}{% \startplacefigure[location=force,number=no] \useMPgraphic{cornystuff} \stopplacefigure \page[yes] } \stoptext changes the color of every letter. I don't complain (in fact it does look better), but I still have a question: what should I do if I wanted to select a random color first and then use it for the entire content? Thanks in advance. Jairo :) --000000000000d0159705acca1c89 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi, list! I have two questions concerning MetaFun:

1st:

What is the correct way to pass a ConTeXt named color (e.g. xwi's "mar= oon")=20 to MetaFun. Using (with \usecolors[xwi] loaded in the preamble):
<= div>
withcolor maroon

does not work. I coul= d copy-paste definitions from ConTeXt sources and do e.g.

\definecol= or [maroon][r=3D.690196,g=3D.188235,b=3D.376471]

b= ut it is unfeasible for complete color schemes. So, is there a better way t= o do it?

2nd:

I was trying to do some stuff for my girlfriend using ConTeXt and I tried to randomize colors in MetaFun using normaldeviate. However, something=20 interesting happens. The following:

\setuplayout[width=3D= middle]
\setuppagenumbering[state=3Dstop]
\setuppapersize[A10,landsca= pe][A10,landscape]
\starttext
\startuseMPgraphic{cornystuff}
draw = outlinetext.f ("\framedtext[frame=3Doff,width=3Dfit,align=3Dmiddle]{I = love you \\ \CONTEXT}") %\CONTEXT is not my girlfriend, it's just = for the example
(withcolor (normaldeviate,normaldeviate,normaldeviate) w= ithpen pencircle scaled 1/5)
scaled 1 ;
\stopuseMPgraphic
\dorecur= se{20}{%
\startplacefigure[location=3Dforce,number=3Dno]
\useMPgrap= hic{cornystuff}
\stopplacefigure
\page[yes]
}
\stoptext
changes the color of every letter. I don't complain (in fact it does look=20 better), but I still have a question: what should I do if I wanted to=20 select a random color first and then use it for the entire content?=20 Thanks in advance.

Jairo :)
--000000000000d0159705acca1c89-- --===============5777065887104966853== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5777065887104966853==--