From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.devel Subject: Re: Default colours in X11 frames? Date: Mon, 21 Jul 2008 16:13:54 -0400 Message-ID: References: <4883BC0F.5060302@harpegolden.net> <86wsjfjrf8.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1216671313 27732 80.91.229.12 (21 Jul 2008 20:15:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2008 20:15:13 +0000 (UTC) Cc: emacs-devel@gnu.org, David De La Harpe Golden To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 21 22:16:02 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KL1na-00040s-JS for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 22:15:58 +0200 Original-Received: from localhost ([127.0.0.1]:43164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL1mh-000861-0U for ged-emacs-devel@m.gmane.org; Mon, 21 Jul 2008 16:15:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL1mc-00085Q-EM for emacs-devel@gnu.org; Mon, 21 Jul 2008 16:14:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL1mb-00085E-O5 for emacs-devel@gnu.org; Mon, 21 Jul 2008 16:14:58 -0400 Original-Received: from [199.232.76.173] (port=49201 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL1mb-00085B-L4 for emacs-devel@gnu.org; Mon, 21 Jul 2008 16:14:57 -0400 Original-Received: from eagle.jhcloos.com ([207.210.242.212]:2029) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KL1mZ-00055J-EV; Mon, 21 Jul 2008 16:14:55 -0400 Original-Received: by eagle.jhcloos.com (Postfix, from userid 10) id 5FC8440198; Mon, 21 Jul 2008 20:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1216671293; bh=UdgALfUJ8IiPXdIHEbLYpXsFyXbQyJ4kGTBJX48S0 Lw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cFJwvh+eoQQxmdjpwU+BU7RwM8Hr9BL3Tr2Ca WnRBjpHNU+sDptWYMDFnx1JvjNV/oGNDv7lx7yz6xHK4S11m0XqdKRoOT/AP1Ng74UO OEO23qzqfMyQ1OtYnQpB5TOwcHZhGT4wqq+vuGGpITgzLV+cFjotZOp6HZtPSaz5mhw = Original-Received: by lugabout.jhcloos.org (Postfix, from userid 500) id 45EB021069E; Mon, 21 Jul 2008 20:14:18 +0000 (UTC) In-Reply-To: <86wsjfjrf8.fsf@lola.quinscape.zz> (David Kastrup's message of "Mon, 21 Jul 2008 15:30:19 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAI1J REFUOE+lU9ESgCAIg64P1y+ngUdxhl5H8wFbbM0OmUiEhKkCYaZThXCo6KE5sCbA1DDX3genvO4d eBQgEMaM5qy6uWk4SfBYfdu9jvBN9nSVDOKRtwb+I3epboOsOX5pZbJNsBJFvmQQ05YMfieIBnYX FK2N6dOawd97r/e8RjkTLzmMsiVgrAoEugtviCM3v2WzjgAAAABJRU5ErkJggg== Copyright: Copyright 2008 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Original-Lines: 59 X-Hashcash: 1:23:080721:dak@gnu.org::WvEhJWQ0HRRuEpW9:000001nANY X-Hashcash: 1:23:080721:david@harpegolden.net::BcPOdYSDdTaRdSco:0000000000000000000000000000000000000000Mzye X-Hashcash: 1:23:080721:emacs-devel@gnu.org::+e50ls1bm4YUFq7o:0000000000000000000000000000000000000000003YHh X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101116 Archived-At: --=-=-= >>>>> "David" == David Kastrup writes: David> Will you fix it in Emacs or in X? In X. David> If the latter: is there a workaround one could use in Emacs for David> people having an unfixed X? In theory. Were one to take rgb.txt (Emacs' copy will work) and convert it into the format used by Xcms.txt (/usr/lib/X11/Xcms.txt on Gentoo, probably the same on most other dists) then libX11 would find the colour name when it searches that and wouldn't bother to ask the server. Everthing before the line: XCMS_COLORDB_START 0.1 is ignored. As is everything after the line: XCMS_COLORDB_END And rgb.txt line such as: 255 250 250 snow could look like this in Xcms.txt: cms snow rgb:255/250/250 Something like this perl script, which reads from either stdin or its filename arguments and writes to stdout, should do it: --=-=-= Content-Type: text/x-perl Content-Disposition: inline #!/usr/bin/perl print "XCMS_COLORDB_START 0.1\n"; # print the colours from the default Xcms.txt print "cms red\t\tCIEXYZ:0.3811/0.2073/0.0213\n"; print "cms green\t\tCIEXYZ:0.3203/0.6805/0.1430\n"; print "cms blue\t\tCIEXYZ:0.2483/0.1122/1.2417\n"; # then convert all of the rgb.txt colours while (<>) { next if /^#/; next if /^$/; chomp; my @line=split; print join(" ",@line[3..$#line]); printf("\t\t\trgb:%x/%x/%x\n", $line[0], $line[1], $line[2]); } print "XCMS_COLORDB_END\n"; exit; --=-=-= -JimC -- James Cloos OpenPGP: 1024D/ED7DAEA6 --=-=-=--