From: James Cloos <cloos@jhcloos.com>
To: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org, David De La Harpe Golden <david@harpegolden.net>
Subject: Re: Default colours in X11 frames?
Date: Mon, 21 Jul 2008 16:13:54 -0400 [thread overview]
Message-ID: <m3sku3806e.fsf@lugabout.jhcloos.org> (raw)
In-Reply-To: <86wsjfjrf8.fsf@lola.quinscape.zz> (David Kastrup's message of "Mon, 21 Jul 2008 15:30:19 +0200")
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
>>>>> "David" == David Kastrup <dak@gnu.org> 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-perl, Size: 526 bytes --]
#!/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;
[-- Attachment #3: Type: text/plain, Size: 75 bytes --]
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
next prev parent reply other threads:[~2008-07-21 20:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-20 18:44 Default colours in X11 frames? James Cloos
2008-07-20 22:28 ` David De La Harpe Golden
2008-07-21 2:34 ` Adrian Robert
2008-07-21 13:14 ` James Cloos
2008-07-21 13:30 ` David Kastrup
2008-07-21 20:13 ` James Cloos [this message]
2008-07-22 4:04 ` James Cloos
2008-07-22 17:16 ` James Cloos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3sku3806e.fsf@lugabout.jhcloos.org \
--to=cloos@jhcloos.com \
--cc=dak@gnu.org \
--cc=david@harpegolden.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.