[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default colours in X11 frames?

From: James Cloos
Subject: Re: Default colours in X11 frames?
Date: Tue, 22 Jul 2008 13:16:22 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

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:


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 /^$/;
      my @line=split;
      print join(" ",@line[3..$#line]);
      printf("\t\t\trgb:%02x/%02x/%02x\n", $line[0], $line[1], $line[2]);
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6

reply via email to

[Prev in Thread] Current Thread [Next in Thread]