From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108029 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Re: Iterate over color scheme in ConTeXt/Lua Date: Sun, 12 Jul 2020 16:54:56 -0500 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2394934976738590001==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33045"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Sun Jul 12 23:55:35 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 1jujwd-0008VW-Jl for gctc-ntg-context-518@m.gmane-mx.org; Sun, 12 Jul 2020 23:55:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7450D185630; Sun, 12 Jul 2020 23:55:10 +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 2nUtLkVkFBCh; Sun, 12 Jul 2020 23:55:09 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 873D5185930; Sun, 12 Jul 2020 23:55:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 46C9618562C for ; Sun, 12 Jul 2020 23:55:08 +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 9e_Z-m3tvfm9 for ; Sun, 12 Jul 2020 23:55:07 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.44; helo=mail-wm1-f44.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 B3B2418560E for ; Sun, 12 Jul 2020 23:55:07 +0200 (CEST) Original-Received: by mail-wm1-f44.google.com with SMTP id j18so11355217wmi.3 for ; Sun, 12 Jul 2020 14:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0L+i7QMCDDHdue0bvGU/RW+oZidN88jnRp+EDh/Q8B0=; b=Arn0s583ELb66LrIzBfSsqs2HzUjFeGP/izFCGQuwzUG9/YicKbE9VNZT3xOsBTpNX +pRpkr95zud5PcETO5vzHu1FKUMV8ncS1IAhENkTWLn6TAjjnbgIbbvQ2st6TRMz/Dgq mbbVRROwRpxWxiEiqtMR/mFU0GDzh5wFwOUJAU3gsPdHJ96iHAANrP5v4rEWVdAVQqwr ygHweFx/Z2M9UcuoL8eNc3FE+5lVzAQu9c+8ePGrgs1ljdsRNIjmMrTXUT3aABWycAiC pKsMGY8EVLOaA9CX07P1wC7OH9wNoF9Nt2xVAchIeG0ZvOuRfAxb50/fnsGX3V1qa7fA Amyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0L+i7QMCDDHdue0bvGU/RW+oZidN88jnRp+EDh/Q8B0=; b=jM6Va1Xrttz+csALcB2j0iB2uvq7KBZhYzUkWXoaWiSJIJYM+PMssv0uUwIV2tDVip l6S4PKU6XKCHDzQI4rZ62JBk9ljE2aseUQVo6nrEUt20ZSguV0/uimq6HJvTdfxmvtoY RR7OJN3O4rwj9iBZb6rIQABGn7KUDaXjztkjvUQpovim3yTMU5nODsElLF36xPH212CZ 6dvgDSjCHHCmfHqKyMMansWgvVSmjzr4Kz/BFdtQ1nsAqNvIgG2PCZ5s85/FGiGl6PqH djcv5ZlBkH32yEZL5zQtRERN0NDjo44gV7sXLkPhv8iCHb3awgVs43tuLQPLNG3bNF6w Gfow== X-Gm-Message-State: AOAM531fO85q+grAL0N5Tn8Hf0n4A04V8Ue0yq0uv2gFhB3GEIDrY2Z2 bOMPW0YZ8iEgf+gMMwhFiM3qpdl2VHot/rsu0u8= X-Google-Smtp-Source: ABdhPJz4QoxjU5THEieAlu05Fkig9jrKHndRdX+4H+eNOQQSSBEXWfmWxQhLwx6MGbzTAodmLNlao+2eec5cKJHmpAM= X-Received: by 2002:a7b:c250:: with SMTP id b16mr15950516wmj.30.1594590907373; Sun, 12 Jul 2020 14:55:07 -0700 (PDT) In-Reply-To: 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:108029 Archived-At: --===============2394934976738590001== Content-Type: multipart/alternative; boundary="000000000000989ba305aa45a0c8" --000000000000989ba305aa45a0c8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El dom., 12 de jul. de 2020 a la(s) 16:20, Hans Hagen (j.hagen@xs4all.nl) escribi=C3=B3: > You get a list of defined color names in 'xwi' with: > > attributes.colors.setlist("xwi") > Nice, it works! I note the first method only works when \usecolors[xwi] is present; otherwise, it prints an interesting "themaintextcolor". Here is a nostalgic mkii accessor for such a list (color support is a > real old feature and conceptually hasn't changed that much): > > \def\WhateverActionIWant#1{#1\par} > > \settrue\collectcolorsinlist \setupcolor[xwi] > > \processcommacommand[\colorlist]\WhateverActionIWant > > but you probably don't want to catch up on that. > It doesn't work in Mark IV (\colorlist is undefined). Maybe I'm too young, but Mark II was already frozen when I was a teenager, so I'm not sure I want to try it now. Thanks, Hans! Cordially, Jairo :) --000000000000989ba305aa45a0c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
El dom., 1= 2 de jul. de 2020 a la(s) 16:20, Hans Hagen (j.hagen@xs4all.nl) escribi=C3=B3:
You get a list of defined color names in 'xwi' with:

=C2=A0 =C2=A0 attributes.colors.setlist("xwi")
=C2=A0
Nice, it works! I note the first method only works when= \usecolors[xwi] is present; otherwise, it prints an interesting "them= aintextcolor".

Here is a nostalgic mkii accessor for such a list (color support is a
real old feature and conceptually hasn't changed that much):

=C2=A0 =C2=A0\def\WhateverActionIWant#1{#1\par}

=C2=A0 =C2=A0\settrue\collectcolorsinlist \setupcolor[xwi]

=C2=A0 =C2=A0\processcommacommand[\colorlist]\WhateverActionIWant

but you probably don't want to catch up on that.
<= br>
It doesn't work in Mark IV (\colorlist is undefined). Maybe I&#= 39;m too young, but Mark II was already frozen when I was a teenager, so I&= #39;m not sure I want to try it now. Thanks, Hans!

Cordia= lly,

Jairo :)
--000000000000989ba305aa45a0c8-- --===============2394934976738590001== 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== --===============2394934976738590001==--