all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: James Cloos <cloos@jhcloos.com>
To: emacs-devel@gnu.org
Subject: Re: Default colours in X11 frames?
Date: Tue, 22 Jul 2008 13:16:22 -0400	[thread overview]
Message-ID: <m3abg9260y.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

      parent reply	other threads:[~2008-07-22 17:16 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
2008-07-22 17:16         ` James Cloos [this message]

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=m3abg9260y.fsf@lugabout.jhcloos.org \
    --to=cloos@jhcloos.com \
    --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.