#!/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;