From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4717 invoked from network); 12 May 2008 11:51:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 May 2008 11:51:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36985 invoked from network); 12 May 2008 11:51:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 May 2008 11:51:01 -0000 Received: (qmail 26498 invoked by alias); 12 May 2008 11:50:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24997 Received: (qmail 26482 invoked from network); 12 May 2008 11:50:57 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 May 2008 11:50:57 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 43A8A80ED172 for ; Mon, 12 May 2008 13:50:51 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly10d.srv.mailcontrol.com (MailControl) with ESMTP id m4CBojBV018430 for ; Mon, 12 May 2008 12:50:48 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 May 2008 12:50:44 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m4CBoitt021967 for ; Mon, 12 May 2008 12:50:44 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m4CBoiuI021964 for ; Mon, 12 May 2008 12:50:44 +0100 X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Numeric colour tip X-Mailer: MH-E 8.0.3; nmh 1.3-RC1; GNU Emacs 22.1.1 Date: Mon, 12 May 2008 12:50:44 +0100 Message-ID: <21963.1210593044@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 12 May 2008 11:50:44.0764 (UTC) FILETIME=[694055C0:01C8B426] X-Scanned-By: MailControl A-08-50-01 (www.mailcontrol.com) on 10.68.0.120 X-Virus-Scanned: ClamAV 0.91.2/7097/Mon May 12 12:51:38 2008 on bifrost X-Virus-Status: Clean Those of you experimenting with colours on terminals that allow more than the simple set of colours might like to be reminded about user-defined arithmetic functions. For example, I've got the following to set up colours for rxvt. autoload -U zmathfuncdef # colour takes red, green, blue (0..3) as arguments zmathfuncdef colour '16 + $1 * 16 + $2 * 4 + $3' zle_highlight=( # sort of lightish blue on dark red region:fg=$((colour(2,2,3))),bg=$((colour(1,0,0))) # yellow on dark blue isearch:fg=$((colour(3,3,0)))bg=$((colour(0,0,1))) # white on not very dark green default:fg=$((colour(3,3,3))),bg=$((colour(0,1,1))) ) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070