X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/803fc2946b1c6a3b876cabea90ebac62ca6e55a9..ebcb46b18968910f150d7c54de8e472dffd923c7:/tools/mktermcol-xcolor diff --git a/tools/mktermcol-xcolor b/tools/mktermcol-xcolor index 615bff2..74bed79 100755 --- a/tools/mktermcol-xcolor +++ b/tools/mktermcol-xcolor @@ -1,11 +1,12 @@ #!/usr/bin/env perl -use 5.010; +use 5.014; use Shiar_Sheet::Colour 1.05; say 'use strict;'; say '+{'; my @names; +my %seen; for my $path (@ARGV) { open my $theme, '<', $path or do { @@ -40,6 +41,13 @@ for my $path (@ARGV) { $huesum > 3 or next; # require number of significant hue changes #TODO tweak to include good-pants, exclude cheesecake-* + if ($seen{"@pal"}++) { + warn "ignore duplicate palette $name\n"; + next; + } + + splice @pal, 8 if "@pal[0..7]" eq "@pal[8..15]"; + say qq("$name" => {); say qq(\ttitle => '$name',); say qq(\tparent => 'cga',);