From: James Cloos <cloos@jhcloos.com>
To: James Cloos <cloos@jhcloos.com>
Subject: Re: Default colours in X11 frames?
Date: Tue, 22 Jul 2008 00:04:47 -0400 [thread overview]
Message-ID: <m3myka1s3t.fsf@lugabout.jhcloos.org> (raw)
In-Reply-To: <m3sku3806e.fsf@lugabout.jhcloos.org> (James Cloos's message of "Mon, 21 Jul 2008 16:13:54 -0400")
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
It turns out rgb:12/3/45 is the same as rgb:12/33/45 rather than
rgb:12/03/45, so that perl script needs to use %02x in its printf:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rgb2xcms.pl --]
[-- Type: text/x-perl; name=rgb2xcms.pl, Size: 532 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:%02x/%02x/%02x\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-22 4:04 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
2008-07-22 4:04 ` James Cloos [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3myka1s3t.fsf@lugabout.jhcloos.org \
--to=cloos@jhcloos.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).