Graphics-ColorNames-v3.5.0/0000775000175000017500000000000013476273563013357 5ustar rrrrGraphics-ColorNames-v3.5.0/META.json0000644000175000017500000000556113476273563015005 0ustar rrrr{ "abstract" : "defines RGB values for common color names", "author" : [ "Robert Rothenberg " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "keywords" : [ "color" ], "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Graphics-ColorNames", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::EOF" : "0", "Test::EOL" : "0", "Test::MinimumVersion" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::LinkCheck" : "0", "Test::Portability::Files" : "0", "Test::TrailingSpace" : "0.0203" } }, "runtime" : { "requires" : { "Exporter" : "5.57", "Module::Load" : "0.10", "Module::Loaded" : "0", "perl" : "v5.10.0", "version" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "File::Spec" : "0", "FileHandle" : "0", "IO::File" : "0", "Module::Metadata" : "0", "Test::Exception" : "0", "Test::More" : "0", "Test::Most" : "0", "constant" : "0", "lib" : "0", "perl" : "v5.10.0" } } }, "provides" : { "Graphics::ColorNames" : { "file" : "lib/Graphics/ColorNames.pm", "version" : "v3.5.0" }, "Graphics::ColorNames::X" : { "file" : "lib/Graphics/ColorNames/X.pm", "version" : "v3.5.0" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-Graphics-ColorNames@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Graphics-ColorNames" }, "repository" : { "type" : "git", "url" : "git://github.com/robrwo/Graphics-ColorNames.git", "web" : "https://github.com/robrwo/Graphics-ColorNames" } }, "version" : "v3.5.0", "x_authority" : "cpan:RRWO", "x_contributors" : [ "Alan D. Salewski ", "Steve Pomeroy ", "\"chemboy\" ", "Magnus Cedergren ", "Gary Vollink ", "Claus F\u00e4rber ", "Andreas J. K\u00f6nig ", "Slaven Rezi\u0107 " ], "x_generated_by_perl" : "v5.28.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.11" } Graphics-ColorNames-v3.5.0/MANIFEST0000644000175000017500000000126213476273563014507 0ustar rrrr# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Changes INSTALL LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README.md cpanfile dist.ini lib/Graphics/ColorNames.pm lib/Graphics/ColorNames/X.pm t-etc/rgb.txt t/00-report-prereqs.dd t/00-report-prereqs.t t/01-exports.t t/02-X.t t/03-oo.t t/04-precedence.t t/05-tied.t t/07-file.t t/08-filehandle.t t/09-colorlibrary.t t/10-sub.t t/author-eof.t t/author-eol.t t/author-minimum-version.t t/author-no-tabs.t t/author-pod-linkcheck.t t/author-pod-syntax.t t/author-portability.t t/lib/Graphics/ColorNames/Test.pm t/release-check-manifest.t t/release-fixme.t t/release-trailing-space.t weaver.ini Graphics-ColorNames-v3.5.0/t/0000775000175000017500000000000013476273563013622 5ustar rrrrGraphics-ColorNames-v3.5.0/t/author-no-tabs.t0000644000175000017500000000171713476273563016656 0ustar rrrr BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Graphics/ColorNames.pm', 'lib/Graphics/ColorNames/X.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/01-exports.t', 't/02-X.t', 't/03-oo.t', 't/04-precedence.t', 't/05-tied.t', 't/07-file.t', 't/08-filehandle.t', 't/09-colorlibrary.t', 't/10-sub.t', 't/author-eof.t', 't/author-eol.t', 't/author-minimum-version.t', 't/author-no-tabs.t', 't/author-pod-linkcheck.t', 't/author-pod-syntax.t', 't/author-portability.t', 't/lib/Graphics/ColorNames/Test.pm', 't/release-check-manifest.t', 't/release-fixme.t', 't/release-trailing-space.t' ); notabs_ok($_) foreach @files; done_testing; Graphics-ColorNames-v3.5.0/t/07-file.t0000644000175000017500000000157313476273563015156 0ustar rrrr#!/usr/bin/perl use strict; use Test::More; use Test::Exception; use File::Spec::Functions qw/ rel2abs /; use_ok( 'Graphics::ColorNames', 3.2, qw( hex2tuple tuple2hex ) ); my $file = './t-etc/rgb.txt'; throws_ok { tie my %colors, 'Graphics::ColorNames', $file; } qr/Unknown color scheme/, 'relative pathnames rejected (TIE)'; throws_ok { my $po = Graphics::ColorNames->new($file); } qr/Unknown color scheme/, 'relative pathnames rejected (OO)'; tie my %colors, 'Graphics::ColorNames', rel2abs($file); ok tied %colors, 'is tied'; is scalar(keys %colors), 6, 'expected number of colors'; my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); foreach my $name (qw( one two three four five six)) { ok( exists $colors{$name} ); } done_testing; Graphics-ColorNames-v3.5.0/t/01-exports.t0000644000175000017500000000077013476273563015733 0ustar rrrr#!/usr/bin/perl use Test::Most; use lib 't/lib'; use_ok( 'Graphics::ColorNames', qw/ all_schemes hex2tuple tuple2hex / ); ok my @schemes = all_schemes(), 'all_schemes'; cmp_deeply( \@schemes, supersetof(qw/ X Test /), 'minimum set of schemes' ); is_deeply [ hex2tuple('010203') ], [ 1, 2, 3 ], 'hex2tuple'; is_deeply [ hex2tuple('ffeedd') ], [ 255, 238, 221 ], 'hex2tuple'; is tuple2hex( 1, 2, 3 ) => '010203', 'tuple2hex'; is tuple2hex( 255, 238, 221 ) => 'ffeedd', 'tuple2hex'; done_testing; Graphics-ColorNames-v3.5.0/t/lib/0000775000175000017500000000000013476273563014370 5ustar rrrrGraphics-ColorNames-v3.5.0/t/lib/Graphics/0000775000175000017500000000000013476273563016130 5ustar rrrrGraphics-ColorNames-v3.5.0/t/lib/Graphics/ColorNames/0000775000175000017500000000000013476273563020172 5ustar rrrrGraphics-ColorNames-v3.5.0/t/lib/Graphics/ColorNames/Test.pm0000755000175000017500000000130513476273563021447 0ustar rrrrpackage Graphics::ColorNames::Test; use v5.6; use strict; use warnings; sub NamesRgbTable() { use integer; return { 'black' => 0x000000, 'blue' => 0x0000ff, 'cyan' => 0x00ffff, 'green' => 0x00ff00, 'magenta' => 0xff00ff, 'red' => 0xff0000, 'yellow' => 0xffff00, 'white' => 0xffffff, 'darkblue' => 0x000080, 'darkcyan' => 0x008080, 'darkgreen' => 0x008000, 'darkmagenta' => 0x800080, 'darkred' => 0x800000, 'darkyellow' => 0x808000, 'darkgray' => 0x808080, 'lightgray' => 0xc0c0c0, }; } 1; __END__ Graphics-ColorNames-v3.5.0/t/08-filehandle.t0000644000175000017500000000315013476273563016324 0ustar rrrr#!/usr/bin/perl use strict; use Test::More tests => 28; use FileHandle; use IO::File; use_ok( 'Graphics::ColorNames', 1.10, qw( hex2tuple tuple2hex ) ); { my $fh = new IO::File; open( $fh, './t-etc/rgb.txt' ); tie my %colors, 'Graphics::ColorNames', $fh; ok( tied %colors ); ok( keys %colors == 6 ); # my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); foreach my $name (qw( one two three four five six)) { ok( exists $colors{$name} ); } close $fh; } { my $fh = new FileHandle; open( $fh, './t-etc/rgb.txt' ); tie my %colors, 'Graphics::ColorNames', $fh; ok( tied %colors ); ok( keys %colors == 6 ); # my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); foreach my $name (qw( one two three four five six)) { ok( exists $colors{$name} ); } close $fh; } { open( my $fh, './t-etc/rgb.txt' ); tie my %colors, 'Graphics::ColorNames', $fh; ok( tied %colors ); ok( keys %colors == 6 ); # my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); foreach my $name (qw( one two three four five six)) { ok( exists $colors{$name} ); } close $fh; } Graphics-ColorNames-v3.5.0/t/author-eol.t0000644000175000017500000000175113476273563016070 0ustar rrrr BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Graphics/ColorNames.pm', 'lib/Graphics/ColorNames/X.pm', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/01-exports.t', 't/02-X.t', 't/03-oo.t', 't/04-precedence.t', 't/05-tied.t', 't/07-file.t', 't/08-filehandle.t', 't/09-colorlibrary.t', 't/10-sub.t', 't/author-eof.t', 't/author-eol.t', 't/author-minimum-version.t', 't/author-no-tabs.t', 't/author-pod-linkcheck.t', 't/author-pod-syntax.t', 't/author-portability.t', 't/lib/Graphics/ColorNames/Test.pm', 't/release-check-manifest.t', 't/release-fixme.t', 't/release-trailing-space.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; Graphics-ColorNames-v3.5.0/t/10-sub.t0000644000175000017500000000105113476273563015011 0ustar rrrr#!/usr/bin/perl use strict; use Test::More; eval "use Tie::Sub"; plan skip_all => "Tie::Sub required" if $@; plan tests => 4; use_ok( 'Graphics::ColorNames', '2.10', qw( all_schemes ) ); tie my %colors, 'Graphics::ColorNames'; # Test handling of non-existent color names ok( !defined $colors{NonExistentColorName} ); ok( !exists $colors{NonExistentColorName} ); # Test dynamic loading of scheme my $colorobj = tied(%colors); $colorobj->load_scheme( sub { return 0x123456; } ); ok( $colors{NonExistentColorName} eq '123456' ); Graphics-ColorNames-v3.5.0/t/05-tied.t0000644000175000017500000000364413476273563015163 0ustar rrrr#!/usr/bin/perl use Test::Most; use lib 't/lib'; use_ok( 'Graphics::ColorNames', '3.3', qw( hex2tuple tuple2hex ) ); tie my %colors, 'Graphics::ColorNames'; ok( tied %colors ); my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); $count = 0; foreach my $name ( keys %colors ) { $count++, if ( $colors{ lc($name) } eq $colors{ uc($name) } ); } ok( $count == keys %colors ); $count = 0; foreach my $name ( keys %colors ) { $count++, if ( exists( $colors{$name} ) ); } ok( $count == keys %colors ); $count = 0; foreach my $name ( keys %colors ) { my $rgb = $colors{$name}; $count++, if ( defined $colors{$rgb} ); $count++, if ( defined $colors{ "\x23" . $rgb } ); } ok( $count == ( 2 * ( keys %colors ) ) ); # Test CLEAR, DELETE and STORE as returning errors dies_ok { undef %colors } "undef %colors"; dies_ok { %colors = (); } "%colors = ()"; dies_ok { $colors{MyCustomColor} = 'FFFFFF'; } "STORE"; dies_ok { delete( $colors{MyCustomColor} ); } "DELETE"; # Test RGB values being passed through foreach my $rgb ( qw( 000000 000001 000010 000100 001000 010000 100000 111111 123abc abc123 123ABC ABC123 abcdef ABCDEF ) ) { ok( $colors{ "\x23" . $rgb } eq lc($rgb) ); ok( $colors{ "0x" . $rgb } eq lc($rgb) ); ok( $colors{$rgb} eq lc($rgb) ); } # Test using multiple schemes, with issues in overlapping tie my %colors3, 'Graphics::ColorNames', qw( X Test ); tie my %colors4, 'Graphics::ColorNames', qw( Test X ); # Test precedence ok( $colors{DarkGreen} eq '006400' ); # DarkGreen in X ok( $colors3{DarkGreen} eq '006400' ); # DarkGreen in X ok( $colors4{DarkGreen} eq '008000' ); # DarkGreen in Test # Test handling of non-existent color names ok( !defined $colors{NonExistentColorName} ); ok( !exists $colors{NonExistentColorName} ); done_testing; Graphics-ColorNames-v3.5.0/t/03-oo.t0000644000175000017500000000460213476273563014644 0ustar rrrr#!/usr/bin/perl use Test::Most; use lib 't/lib'; use_ok('Graphics::ColorNames'); my $s = Graphics::ColorNames->new; isa_ok $s, 'Graphics::ColorNames'; subtest 'hex' => sub { is $s->hex('darkgreen'), '006400', 'darkgreen'; is $s->hex('Dark Green'), '006400', 'Dark Green'; is $s->hex('Dark-Green'), '006400', 'Dark-Green'; is $s->hex('Dark_Green'), '006400', 'Dark-Green'; is $s->hex( 'darkgreen', '#' ), '#006400', 'darkgreen (prefix)'; is $s->hex( 'darkgreen', '0x' ), '0x006400', 'darkgreen (prefix)'; is $s->hex('dorkreen'), '', 'nonexistenct color'; is $s->hex( 'dorkreen', '#' ), '', 'nonexistenct color with prefix'; is $s->hex('123abc') => '123abc', 'passthru'; is $s->hex('#123abc') => '123abc', 'passthru (# prefix)'; is $s->hex('0x123abc') => '123abc', 'passthru (0x prefix)'; }; subtest 'rgb' => sub { is_deeply [ $s->rgb('darkgreen') ], [ 0, 0x64, 0 ], 'darkgreen'; is_deeply [ $s->rgb('DarkGreen') ], [ 0, 0x64, 0 ], 'DarkGreen'; is_deeply [ $s->rgb('Dark-Green') ], [ 0, 0x64, 0 ], 'Dark-Green'; is_deeply [ $s->rgb('Dark_Green') ], [ 0, 0x64, 0 ], 'Dark_Green'; is_deeply [ $s->rgb( 'darkgreen', ',' ) ], [ 0, 0x64, 0 ], 'darkgreen (separator ignored in list context)'; is $s->rgb('darkgreen'), "0,100,0", 'darkgreen (scalar)'; is $s->rgb( 'darkgreen', ' ' ), "0 100 0", 'darkgreen (scalar with separator)'; is_deeply [ $s->rgb('dorkreen') ], [], 'nonexistent color'; is $s->rgb('dorkreen'), '', 'nonexistent color (scalar context)'; is $s->rgb( 'dorkreen', ' ' ), '', 'nonexistent color (scalar context with separator)'; is_deeply [ $s->rgb('123abc') ] => [ 18, 58, 188 ], 'passthru (list context)'; is $s->rgb('123abc') => '18,58,188', 'passthru'; is $s->rgb( '123abc', ' ' ) => '18 58 188', 'passthru (with separator)'; is $s->rgb('#123abc') => '18,58,188', 'passthru (# prefix)'; is $s->rgb('0x123abc') => '18,58,188', 'passthru (0x prefix)'; }; subtest 'load_scheme' => sub { is $s->hex('nonexistentcolorname') => '', 'unknown color'; ok $s->load_scheme( { nonexistentcolorname => 0x123456 } ), 'load_scheme'; is $s->hex('nonexistentcolorname') => '123456', 'loaded color'; }; subtest 'autoloading removed' => sub { ok $s->rgb('darkgreen'), 'has darkgreen color'; ok !$s->can('darkgreen'), 'no darkgreen method'; }; done_testing; Graphics-ColorNames-v3.5.0/t/02-X.t0000644000175000017500000000126713476273563014441 0ustar rrrr#!/usr/bin/perl use strict; use Test::More tests => 19; use_ok( 'Graphics::ColorNames', 2.1002, qw( hex2tuple tuple2hex ) ); tie my %colors, 'Graphics::ColorNames', 'X'; ok( tied %colors ); is( scalar(keys %colors), 676 ); # my $count = 0; foreach my $name ( keys %colors ) { my @RGB = hex2tuple( $colors{$name} ); $count++, if ( tuple2hex(@RGB) eq $colors{$name} ); } ok( $count == keys %colors ); foreach my $ad (qw( royal dodger slate sky steel )) { foreach my $col (qw( blue )) { ok( exists $colors{"$ad$col"} ); ok( $colors{"$ad$col"} eq $colors{"$ad $col"}, "$ad $col" ); ok( $colors{"$ad-$col"} eq $colors{"$ad $col"}, "$ad $col" ); } } Graphics-ColorNames-v3.5.0/t/04-precedence.t0000644000175000017500000000061413476273563016324 0ustar rrrr#!/usr/bin/perl use Test::Most; use lib 't/lib'; use_ok( 'Graphics::ColorNames' ); my $sxw = Graphics::ColorNames->new( qw/ X Test / ); isa_ok $sxw, 'Graphics::ColorNames'; is $sxw->hex('darkgreen'), '006400', 'DarkGreen (X)'; my $swx = Graphics::ColorNames->new( qw/ Test X / ); isa_ok $swx, 'Graphics::ColorNames'; is $swx->hex('darkgreen'), '008000', 'DarkGreen (Test)'; done_testing; Graphics-ColorNames-v3.5.0/t/author-portability.t0000644000175000017500000000047113476273563017651 0ustar rrrr BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); Graphics-ColorNames-v3.5.0/t/00-report-prereqs.dd0000644000175000017500000000416113476273563017342 0ustar rrrrdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Test::EOF' => '0', 'Test::EOL' => '0', 'Test::MinimumVersion' => '0', 'Test::More' => '0.88', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::LinkCheck' => '0', 'Test::Portability::Files' => '0', 'Test::TrailingSpace' => '0.0203' } }, 'runtime' => { 'requires' => { 'Exporter' => '5.57', 'Module::Load' => '0.10', 'Module::Loaded' => '0', 'perl' => 'v5.10.0', 'version' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'File::Spec' => '0', 'FileHandle' => '0', 'IO::File' => '0', 'Module::Metadata' => '0', 'Test::Exception' => '0', 'Test::More' => '0', 'Test::Most' => '0', 'constant' => '0', 'lib' => '0', 'perl' => 'v5.10.0' } } }; $x; }Graphics-ColorNames-v3.5.0/t/release-trailing-space.t0000644000175000017500000000116313476273563020326 0ustar rrrr#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } use strict; use warnings; use Test::More; eval "use Test::TrailingSpace"; if ($@) { plan skip_all => "Test::TrailingSpace required for trailing space test."; } else { plan tests => 1; } # TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly # some other stuff. my $finder = Test::TrailingSpace->new( { root => '.', filename_regex => qr#\.(?:p[lm]|pod)\z#, }, ); # TEST $finder->no_trailing_space( "No trailing space was found." ); Graphics-ColorNames-v3.5.0/t/release-fixme.t0000644000175000017500000000040513476273563016532 0ustar rrrr#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } # This test is generated by Dist::Zilla::Plugin::Test::Fixme use strict; use warnings; use Test::Fixme; run_tests(); Graphics-ColorNames-v3.5.0/t/author-pod-linkcheck.t0000644000175000017500000000074113476273563020022 0ustar rrrr#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Graphics-ColorNames-v3.5.0/t/author-pod-syntax.t0000644000175000017500000000045413476273563017416 0ustar rrrr#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Graphics-ColorNames-v3.5.0/t/09-colorlibrary.t0000644000175000017500000000161013476273563016734 0ustar rrrr#!/usr/bin/perl use strict; use Test::More; eval "use Color::Library 0.02"; plan skip_all => "Color::Library 0.02 required" if $@; use constant TEST_CASES => { "croceus" => 0xf4c2c2, "croceus28" => 0xf4c2c2, "croceus53" => 0xd99058, # "black" => 0x000000, # "aqua" => 0x00ffff, # "maroon" => 0x800000, # "lime" => 0x00ff00, }; my $tests = TEST_CASES; plan tests => 3 + ( keys %$tests ); use_ok( "Graphics::ColorNames", "2.10002" ); use_ok("Color::Library::Dictionary::NBS_ISCC::B"); { my $obj = Graphics::ColorNames->new('Color::Library::Dictionary::NBS_ISCC::B'); ok( $obj->isa("Graphics::ColorNames") ); foreach my $name ( keys %$tests ) { ok( $obj->hex($name) eq sprintf( '%06x', $tests->{$name} ), "failed test for color $name" ); } } Graphics-ColorNames-v3.5.0/t/author-eof.t0000644000175000017500000000064113476273563016057 0ustar rrrr BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; # Generated by Dist::Zilla::Plugin::Test::EOF 0.0600 eval "use Test::EOF"; plan skip_all => 'Test::EOF required to test for correct end of file flag' if $@; all_perl_files_ok({ minimum_newlines => 1, maximum_newlines => 4 }); done_testing(); Graphics-ColorNames-v3.5.0/t/release-check-manifest.t0000644000175000017500000000071013476273563020302 0ustar rrrr#!perl -T BEGIN { unless ($ENV{RELEASE_TESTING}) { print qq{1..0 # SKIP these tests are for release candidate testing\n}; exit } } BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::CheckManifest 1.24"; plan skip_all => "Test::CheckManifest 1.24 required for testing MANIFEST" if $@; ok_manifest(); Graphics-ColorNames-v3.5.0/t/author-minimum-version.t0000644000175000017500000000035613476273563020447 0ustar rrrr BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_from_metayml_ok(); Graphics-ColorNames-v3.5.0/t/00-report-prereqs.t0000644000175000017500000001345213476273563017221 0ustar rrrr#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; use Module::Metadata; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = Module::Metadata->new_from_file( File::Spec->catfile($prefix, $file) )->version; $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: Graphics-ColorNames-v3.5.0/lib/0000775000175000017500000000000013476273563014125 5ustar rrrrGraphics-ColorNames-v3.5.0/lib/Graphics/0000775000175000017500000000000013476273563015665 5ustar rrrrGraphics-ColorNames-v3.5.0/lib/Graphics/ColorNames.pm0000755000175000017500000004062013476273563020270 0ustar rrrrpackage Graphics::ColorNames; use 5.006; # ABSTRACT: defines RGB values for common color names use strict; use warnings; use v5.10; use Exporter qw/ import /; use Carp; use File::Spec::Functions qw/ file_name_is_absolute /; use Module::Load 0.10; use Module::Loaded; our $VERSION = 'v3.5.0'; our %EXPORT_TAGS = ( 'all' => [qw( hex2tuple tuple2hex all_schemes )], 'utility' => [qw( hex2tuple tuple2hex )], ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = (); sub VERSION { my ( $class, $wanted ) = @_; require version; return version->parse($VERSION); } # We store Schemes in a hash as a quick-and-dirty way to filter # duplicates (which sometimes occur when directories are repeated in # @INC or via symlinks). The order does not matter. my %FoundSchemes = (); sub _load { while ( my $module = shift ) { unless ( is_loaded($module) ) { load($module); mark_as_loaded($module) unless ( is_loaded($module) ); } } } # TODO - see if using Tie::Hash::Layered gives an improvement sub _load_scheme_from_module { my ($self, $scheme) = @_; my $module = $scheme =~ /^\+/ ? substr( $scheme, 1 ) : $scheme =~ /^Color::Library::Dictionary::/ ? $scheme : __PACKAGE__ . '::' . $scheme; eval { _load($module); }; if ($@) { croak "Cannot load color naming scheme module $module"; } if ($module->can('NamesRgbTable')) { $self->load_scheme( $module->NamesRgbTable ); } elsif ($module->can('_load_color_list')) { $self->load_scheme( $module->_load_color_list ); } else { croak "Unknown scheme type: $module"; } } sub TIEHASH { my $class = shift || __PACKAGE__; my $self = { _schemes => [], _iterator => 0, }; bless $self, $class; if (@_) { foreach my $scheme (@_) { if ( ref $scheme ) { $self->load_scheme($scheme); } elsif ($scheme =~ /^\+?(?:\w+[:][:])*\w+$/) { $self->_load_scheme_from_module($scheme); } elsif ( file_name_is_absolute($scheme) ) { $self->_load_scheme_from_file($scheme); } else { croak "Unknown color scheme: $scheme"; } } } else { $self->_load_scheme_from_module('X'); } return $self; } sub FETCH { my $self = shift; my $key = lc( shift || "" ); # If we're passing it an RGB value, return that value if ( $key =~ m/^(?:\x23|0x)?([0-9a-f]{6})$/ ) { return $1; } else { $key =~ s/[^0-9a-z\%]//g; # ignore non-word characters my $val = undef; my $i = 0; while ( ( !defined $val ) && ( $i < @{ $self->{_schemes} } ) ) { $val = $self->{_schemes}->[ $i++ ]->{$key}; } if ( defined $val ) { return sprintf( '%06x', $val ),; } else { return; } } } sub EXISTS { my ( $self, $key ) = @_; defined( $self->FETCH($key) ); } sub FIRSTKEY { ( my $self = shift )->{_iterator} = 0; each %{ $self->{_schemes}->[ $self->{_iterator} ] }; } sub NEXTKEY { my $self = shift; my ( $key, $val ) = each %{ $self->{_schemes}->[ $self->{_iterator} ] }; unless ( defined $key ) { ( $key, $val ) = each %{ $self->{_schemes}->[ ++$self->{_iterator} ] }; } return $key; } sub load_scheme { my $self = shift; my $scheme = shift; if ( ref($scheme) eq "HASH" ) { push @{ $self->{_schemes} }, $scheme; } elsif ( ref($scheme) eq "CODE" ) { _load("Tie::Sub"); push @{ $self->{_schemes} }, {}; tie %{ $self->{_schemes}->[-1] }, 'Tie::Sub', $scheme; } elsif ( ref($scheme) eq "ARRAY" ) { # assumes these are Color::Library::Dictionary 0.02 files my $s = {}; foreach my $rec (@$scheme) { my $key = $rec->[0]; my $name = $rec->[1]; my $code = $rec->[5]; $name =~ s/[\W\_]//g; # ignore non-word characters $s->{$name} = $code unless ( exists $s->{$name} ); if ( $key =~ /^(.+\:.+)\.([0-9]+)$/ ) { $s->{"$name$2"} = $code; } } push @{ $self->{_schemes} }, $s; } else { # TODO - use Exception undef $!; eval { if ( ( ref($scheme) eq 'GLOB' ) || ref($scheme) eq "IO::File" || $scheme->isa('IO::File') || ref($scheme) eq "FileHandle" || $scheme->isa('FileHandle') ) { $self->_load_scheme_from_file($scheme); } }; if ($@) { croak "Error $@ on scheme type ", ref($scheme); } elsif ($!) { croak "$!"; } else { # everything is ok? } } } sub _find_schemes { my $path = shift; # BUG: deep-named schemes such as Graphics::ColorNames::Foo::Bar # are not supported. if ( -d $path ) { my $dh = DirHandle->new($path) || croak "Unable to access directory $path"; while ( defined( my $fn = $dh->read ) ) { if ( ( -r File::Spec->catdir( $path, $fn ) ) && ( $fn =~ /(.+)\.pm$/ ) ) { $FoundSchemes{$1}++; } } } } sub _readonly_error { croak "Cannot modify a read-only value"; } sub DESTROY { my $self = shift; delete $self->{_schemes}; delete $self->{_iterator}; } BEGIN { no strict 'refs'; *STORE = \&_readonly_error; *DELETE = \&_readonly_error; *CLEAR = \&_readonly_error; # causes problems with 'undef' *new = \&TIEHASH; } # Convert 6-digit hexidecimal code (used for HTML etc.) to an array of # RGB values sub hex2tuple { my $rgb = CORE::hex(shift); my ( $red, $green, $blue ); $blue = ( $rgb & 0x0000ff ); $green = ( $rgb & 0x00ff00 ) >> 8; $red = ( $rgb & 0xff0000 ) >> 16; return ( $red, $green, $blue ); } # Convert list of RGB values to 6-digit hexidecimal code (used for HTML, etc.) sub tuple2hex { my ( $red, $green, $blue ) = @_; my $rgb = sprintf "%.2x%.2x%.2x", $red, $green, $blue; return $rgb; } sub all_schemes { unless (%FoundSchemes) { _load( "DirHandle", "File::Spec" ); foreach my $dir (@INC) { _find_schemes( File::Spec->catdir( $dir, split( /::/, __PACKAGE__ ) ) ); } } return ( keys %FoundSchemes ); } sub _load_scheme_from_file { my $self = shift; my $file = shift; unless ( ref $file ) { unless ( -r $file ) { croak "Cannot load scheme from file: \'$file\'"; } _load("IO::File"); } my $fh = ref($file) ? $file : ( IO::File->new ); unless ( ref $file ) { open( $fh, $file ) || croak "Cannot open file: \'$file\'"; } my $scheme = {}; while ( my $line = <$fh> ) { chomp($line); $line =~ s/[\!\#].*$//; if ( $line ne "" ) { my $name = lc( substr( $line, 12 ) ); $name =~ s/[\W]//g; # remove anything that isn't a letter or number croak "Missing color name", unless ( $name ne "" ); # TODO? Should we add an option to warn if overlapping names # are defined? This seems to be too common to be useful. # unless (exists $scheme->{$name}) { $scheme->{$name} = 0; foreach ( 0, 4, 8 ) { $scheme->{$name} <<= 8; $scheme->{$name} |= ( eval substr( $line, $_, 3 ) ); } # } } } $self->load_scheme($scheme); unless ( ref $file ) { close $fh; } } sub hex { my ($self, $name, $prefix) = @_; my $rgb = $self->FETCH($name); return '' unless defined $rgb; return $rgb unless defined $prefix; return $prefix . $rgb; } sub rgb { my ($self, $name, $separator) = @_; my $rgb = $self->FETCH($name); my @rgb = (defined $rgb) ? hex2tuple( $rgb ) : (); return wantarray ? @rgb : join($separator || ',', @rgb); } 1; __END__ =pod =encoding UTF-8 =head1 NAME Graphics::ColorNames - defines RGB values for common color names =head1 VERSION version v3.5.0 =head1 SYNOPSIS use Graphics::ColorNames; use Graphics::ColorNames::WWW; $pal = Graphics::ColorNames->new( qw[ X WWW ] ); $rgb = $pal->hex('green'); # returns '00ff00' $rgb = $pal->hex('green', '0x'); # returns '0x00ff00' $rgb = $pal->hex('green', '#'); # returns '#00ff00' $rgb = $pal->rgb('green'); # returns '0,255,0' @rgb = $pal->rgb('green'); # returns (0, 255, 0) =head1 DESCRIPTION This module provides a common interface for obtaining the RGB values of colors by standard names. The intention is to (1) provide a common module that authors can use with other modules to specify colors by name; and (2) free module authors from having to "re-invent the wheel" whenever they decide to give the users the option of specifying a color by name rather than RGB value. =head1 METHODS =head2 C The constructor is as follows: my $pal = Graphics::ColorNames->new( @schemes ); where C<@schemes> is an array of color schemes (palettes, dictionaries). A valid color scheme may be the name of a color scheme (such as C or a full module name such as C), a reference to a color scheme hash or subroutine, or to the path or open filehandle for a F file. If none are specified, it uses the default C color scheme, which corresponds to the X-Windows F colors. For most purposes, this is good enough. Since v3.2.0, it was updated to use the 2014-07-06 colors, so includes the standard CSS colors as well. Other color schemes are available on CPAN, e.g. L. Since version 2.1002, L dictionaries can be used as well: my $pal = Graphics::ColorNames->new( 'Color::Library::Dictionary::HTML' ); =head2 C @rgb = $pal->rgb($name); $rgb = $pal->rgb($name, $separator); If called in a list context, returns a triplet. If called in a scalar context, returns a string separated by an optional separator (which defauls to a comma). For example, @rgb = $pal->rgb('blue'); # returns (0, 0, 255) $rgb = $pal->rgb('blue', ','); # returns "0,0,255" Unknown color names return empty lists or strings, depending on the context. Color names are case insensitive, and spaces or punctuation are ignored. So "Alice Blue" returns the same value as "aliceblue", "ALICE-BLUE" and "a*lICEbl-ue". (If you are using color names based on user input, you should add additional validation of the color names.) The value returned is in the six-digit hexidecimal format used in HTML and CSS (without the initial '#'). To convert it to separate red, green, and blue values (between 0 and 255), use the L function. You may also specify an absolute filename as a color scheme, if the file is in the same format as the standard F file. =head2 C $hex = $pal->hex($name, $prefix); Returns a 6-digit hexidecimal RGB code for the color. If an optional prefix is specified, it will prefix the code with that string. For example, $hex = $pal->hex('blue', '#'); # returns "#0000ff" If the color does not exist, it will return an empty string. A hexidecimal RGB value in the form of C<#RRGGBB>, C<0xRRGGBB> or C will return itself: $color = $pal->hex('#123abc'); # returns '123abc' =head2 autoloaded color name methods Autoloaded color name methods were removed in v3.4.0. =head2 C $pal->load_scheme( $scheme ); This dynamically loads a color scheme, which can be either a hash reference or code reference. =head1 EXPORTS =head2 C my @schemes = all_schemes(); Returns a list of all available color schemes installed on the machine in the F namespace. The order has no significance. =head2 C Converts a hexidecimal string to a tuple. =head2 C Converts a tuple to a hexidecimal string. =head1 TIED INTERFACE The standard interface (prior to version 0.40) was through a tied hash: tie %pal, 'Graphics::ColorNames', qw[ X WWW ]; This interface is deprecated, and will be moved to a separate module in the future. =head1 CUSTOM COLOR SCHEMES You can add naming scheme files by creating a Perl module is the name C which has a subroutine named C that returns a hash of color names and RGB values. (Schemes with a different base namespace will require the fill namespace to be given.) The color names must be in all lower-case, and the RGB values must be 24-bit numbers containing the red, green, and blue values in most- significant to least- significant byte order. An example naming schema is below: package Graphics::ColorNames::Metallic; sub NamesRgbTable() { use integer; return { copper => 0xb87333, gold => 0xcd7f32, silver => 0xe6e8fa, }; } You would use the above schema as follows: tie %colors, 'Graphics::ColorNames', 'Metallic'; The behavior of specifying multiple keys with the same name is undefined as to which one takes precedence. As of version 2.10, case, spaces and punctuation are ignored in color names. So a name like "Willy's Favorite Shade-of-Blue" is treated the same as "willysfavoroteshadeofblue". (If your scheme does not include duplicate entrieswith spaces and punctuation, then the minimum version of L should be 2.10 in your requirements.) An example of an additional module is the L module. Since version 1.03, C may also return a code reference: package Graphics::ColorNames::Orange; sub NamesRgbTable() { return sub { my $name = shift; return 0xffa500; }; } See L for an example. =head1 ROADMAP The following changes are planned in the future: =over 4 =item * The tied interface will be removed, but implemented in a separate module for users that wish to use it. =item * The namespace for color schemes will be moved to the C but options will be added to use the existing scheme. This will allow modules to be named like C without being confused for color schemes. =item * This module will be rewritten to be a L-based class. =back =head1 SEE ALSO L provides an extensive library of color schemes. A notable difference is that it supports more complex schemes which contain additional information about individual colors and map multiple colors to a single name. L has a similar function to this module, but parses an F file. L can convert between RGB and other color space types. L can also convert betweeb RGB and other color space types, and supports RGB from names in various color schemes. L provides subroutines corresponding to color names. =head1 SOURCE The development version is on github at L and may be cloned from L The SourceForge project for this module at L is no longer maintained. =head1 BUGS Please report any bugs or feature requests on the bugtracker website L or by email to L. When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Robert Rothenberg =head1 CONTRIBUTORS =for stopwords Alan D. Salewski Steve Pomeroy "chemboy" Magnus Cedergren Gary Vollink Claus Färber Andreas J. König Slaven Rezić =over 4 =item * Alan D. Salewski =item * Steve Pomeroy =item * "chemboy" =item * Magnus Cedergren =item * Gary Vollink =item * Claus Färber =item * Andreas J. König =item * Slaven Rezić =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2001-2019 by Robert Rothenberg. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Graphics-ColorNames-v3.5.0/lib/Graphics/ColorNames/0000775000175000017500000000000013476273563017727 5ustar rrrrGraphics-ColorNames-v3.5.0/lib/Graphics/ColorNames/X.pm0000755000175000017500000007525313476273563020511 0ustar rrrrpackage Graphics::ColorNames::X; # ABSTRACT: X-Windows color names and equivalent RGB values use strict; use warnings; our $VERSION = 'v3.5.0'; sub NamesRgbTable() { use integer; return { "snow" => 0xfffafa, "ghostwhite" => 0xf8f8ff, "whitesmoke" => 0xf5f5f5, "gainsboro" => 0xdcdcdc, "floralwhite" => 0xfffaf0, "oldlace" => 0xfdf5e6, "linen" => 0xfaf0e6, "antiquewhite" => 0xfaebd7, "papayawhip" => 0xffefd5, "blanchedalmond" => 0xffebcd, "bisque" => 0xffe4c4, "peachpuff" => 0xffdab9, "navajowhite" => 0xffdead, "moccasin" => 0xffe4b5, "cornsilk" => 0xfff8dc, "ivory" => 0xfffff0, "lemonchiffon" => 0xfffacd, "seashell" => 0xfff5ee, "honeydew" => 0xf0fff0, "mintcream" => 0xf5fffa, "azure" => 0xf0ffff, "aliceblue" => 0xf0f8ff, "lavender" => 0xe6e6fa, "lavenderblush" => 0xfff0f5, "mistyrose" => 0xffe4e1, "white" => 0xffffff, "black" => 0x000000, "darkslategray" => 0x2f4f4f, "darkslategrey" => 0x2f4f4f, "dimgray" => 0x696969, "dimgrey" => 0x696969, "slategray" => 0x708090, "slategrey" => 0x708090, "lightslategray" => 0x778899, "lightslategrey" => 0x778899, "gray" => 0xbebebe, "grey" => 0xbebebe, "x11gray" => 0xbebebe, "x11grey" => 0xbebebe, "webgray" => 0x808080, "webgrey" => 0x808080, "lightgrey" => 0xd3d3d3, "lightgray" => 0xd3d3d3, "midnightblue" => 0x191970, "navy" => 0x000080, "navyblue" => 0x000080, "cornflowerblue" => 0x6495ed, "darkslateblue" => 0x483d8b, "slateblue" => 0x6a5acd, "mediumslateblue" => 0x7b68ee, "lightslateblue" => 0x8470ff, "mediumblue" => 0x0000cd, "royalblue" => 0x4169e1, "blue" => 0x0000ff, "dodgerblue" => 0x1e90ff, "deepskyblue" => 0x00bfff, "skyblue" => 0x87ceeb, "lightskyblue" => 0x87cefa, "steelblue" => 0x4682b4, "lightsteelblue" => 0xb0c4de, "lightblue" => 0xadd8e6, "powderblue" => 0xb0e0e6, "paleturquoise" => 0xafeeee, "darkturquoise" => 0x00ced1, "mediumturquoise" => 0x48d1cc, "turquoise" => 0x40e0d0, "cyan" => 0x00ffff, "aqua" => 0x00ffff, "lightcyan" => 0xe0ffff, "cadetblue" => 0x5f9ea0, "mediumaquamarine" => 0x66cdaa, "aquamarine" => 0x7fffd4, "darkgreen" => 0x006400, "darkolivegreen" => 0x556b2f, "darkseagreen" => 0x8fbc8f, "seagreen" => 0x2e8b57, "mediumseagreen" => 0x3cb371, "lightseagreen" => 0x20b2aa, "palegreen" => 0x98fb98, "springgreen" => 0x00ff7f, "lawngreen" => 0x7cfc00, "green" => 0x00ff00, "lime" => 0x00ff00, "x11green" => 0x00ff00, "webgreen" => 0x008000, "chartreuse" => 0x7fff00, "mediumspringgreen" => 0x00fa9a, "greenyellow" => 0xadff2f, "limegreen" => 0x32cd32, "yellowgreen" => 0x9acd32, "forestgreen" => 0x228b22, "olivedrab" => 0x6b8e23, "darkkhaki" => 0xbdb76b, "khaki" => 0xf0e68c, "palegoldenrod" => 0xeee8aa, "lightgoldenrodyellow" => 0xfafad2, "lightyellow" => 0xffffe0, "yellow" => 0xffff00, "gold" => 0xffd700, "lightgoldenrod" => 0xeedd82, "goldenrod" => 0xdaa520, "darkgoldenrod" => 0xb8860b, "rosybrown" => 0xbc8f8f, "indianred" => 0xcd5c5c, "saddlebrown" => 0x8b4513, "sienna" => 0xa0522d, "peru" => 0xcd853f, "burlywood" => 0xdeb887, "beige" => 0xf5f5dc, "wheat" => 0xf5deb3, "sandybrown" => 0xf4a460, "tan" => 0xd2b48c, "chocolate" => 0xd2691e, "firebrick" => 0xb22222, "brown" => 0xa52a2a, "darksalmon" => 0xe9967a, "salmon" => 0xfa8072, "lightsalmon" => 0xffa07a, "orange" => 0xffa500, "darkorange" => 0xff8c00, "coral" => 0xff7f50, "lightcoral" => 0xf08080, "tomato" => 0xff6347, "orangered" => 0xff4500, "red" => 0xff0000, "hotpink" => 0xff69b4, "deeppink" => 0xff1493, "pink" => 0xffc0cb, "lightpink" => 0xffb6c1, "palevioletred" => 0xdb7093, "maroon" => 0xb03060, "x11maroon" => 0xb03060, "webmaroon" => 0x800000, "mediumvioletred" => 0xc71585, "violetred" => 0xd02090, "magenta" => 0xff00ff, "fuchsia" => 0xff00ff, "violet" => 0xee82ee, "plum" => 0xdda0dd, "orchid" => 0xda70d6, "mediumorchid" => 0xba55d3, "darkorchid" => 0x9932cc, "darkviolet" => 0x9400d3, "blueviolet" => 0x8a2be2, "purple" => 0xa020f0, "x11purple" => 0xa020f0, "webpurple" => 0x800080, "mediumpurple" => 0x9370db, "thistle" => 0xd8bfd8, "snow1" => 0xfffafa, "snow2" => 0xeee9e9, "snow3" => 0xcdc9c9, "snow4" => 0x8b8989, "seashell1" => 0xfff5ee, "seashell2" => 0xeee5de, "seashell3" => 0xcdc5bf, "seashell4" => 0x8b8682, "antiquewhite1" => 0xffefdb, "antiquewhite2" => 0xeedfcc, "antiquewhite3" => 0xcdc0b0, "antiquewhite4" => 0x8b8378, "bisque1" => 0xffe4c4, "bisque2" => 0xeed5b7, "bisque3" => 0xcdb79e, "bisque4" => 0x8b7d6b, "peachpuff1" => 0xffdab9, "peachpuff2" => 0xeecbad, "peachpuff3" => 0xcdaf95, "peachpuff4" => 0x8b7765, "navajowhite1" => 0xffdead, "navajowhite2" => 0xeecfa1, "navajowhite3" => 0xcdb38b, "navajowhite4" => 0x8b795e, "lemonchiffon1" => 0xfffacd, "lemonchiffon2" => 0xeee9bf, "lemonchiffon3" => 0xcdc9a5, "lemonchiffon4" => 0x8b8970, "cornsilk1" => 0xfff8dc, "cornsilk2" => 0xeee8cd, "cornsilk3" => 0xcdc8b1, "cornsilk4" => 0x8b8878, "ivory1" => 0xfffff0, "ivory2" => 0xeeeee0, "ivory3" => 0xcdcdc1, "ivory4" => 0x8b8b83, "honeydew1" => 0xf0fff0, "honeydew2" => 0xe0eee0, "honeydew3" => 0xc1cdc1, "honeydew4" => 0x838b83, "lavenderblush1" => 0xfff0f5, "lavenderblush2" => 0xeee0e5, "lavenderblush3" => 0xcdc1c5, "lavenderblush4" => 0x8b8386, "mistyrose1" => 0xffe4e1, "mistyrose2" => 0xeed5d2, "mistyrose3" => 0xcdb7b5, "mistyrose4" => 0x8b7d7b, "azure1" => 0xf0ffff, "azure2" => 0xe0eeee, "azure3" => 0xc1cdcd, "azure4" => 0x838b8b, "slateblue1" => 0x836fff, "slateblue2" => 0x7a67ee, "slateblue3" => 0x6959cd, "slateblue4" => 0x473c8b, "royalblue1" => 0x4876ff, "royalblue2" => 0x436eee, "royalblue3" => 0x3a5fcd, "royalblue4" => 0x27408b, "blue1" => 0x0000ff, "blue2" => 0x0000ee, "blue3" => 0x0000cd, "blue4" => 0x00008b, "dodgerblue1" => 0x1e90ff, "dodgerblue2" => 0x1c86ee, "dodgerblue3" => 0x1874cd, "dodgerblue4" => 0x104e8b, "steelblue1" => 0x63b8ff, "steelblue2" => 0x5cacee, "steelblue3" => 0x4f94cd, "steelblue4" => 0x36648b, "deepskyblue1" => 0x00bfff, "deepskyblue2" => 0x00b2ee, "deepskyblue3" => 0x009acd, "deepskyblue4" => 0x00688b, "skyblue1" => 0x87ceff, "skyblue2" => 0x7ec0ee, "skyblue3" => 0x6ca6cd, "skyblue4" => 0x4a708b, "lightskyblue1" => 0xb0e2ff, "lightskyblue2" => 0xa4d3ee, "lightskyblue3" => 0x8db6cd, "lightskyblue4" => 0x607b8b, "slategray1" => 0xc6e2ff, "slategray2" => 0xb9d3ee, "slategray3" => 0x9fb6cd, "slategray4" => 0x6c7b8b, "lightsteelblue1" => 0xcae1ff, "lightsteelblue2" => 0xbcd2ee, "lightsteelblue3" => 0xa2b5cd, "lightsteelblue4" => 0x6e7b8b, "lightblue1" => 0xbfefff, "lightblue2" => 0xb2dfee, "lightblue3" => 0x9ac0cd, "lightblue4" => 0x68838b, "lightcyan1" => 0xe0ffff, "lightcyan2" => 0xd1eeee, "lightcyan3" => 0xb4cdcd, "lightcyan4" => 0x7a8b8b, "paleturquoise1" => 0xbbffff, "paleturquoise2" => 0xaeeeee, "paleturquoise3" => 0x96cdcd, "paleturquoise4" => 0x668b8b, "cadetblue1" => 0x98f5ff, "cadetblue2" => 0x8ee5ee, "cadetblue3" => 0x7ac5cd, "cadetblue4" => 0x53868b, "turquoise1" => 0x00f5ff, "turquoise2" => 0x00e5ee, "turquoise3" => 0x00c5cd, "turquoise4" => 0x00868b, "cyan1" => 0x00ffff, "cyan2" => 0x00eeee, "cyan3" => 0x00cdcd, "cyan4" => 0x008b8b, "darkslategray1" => 0x97ffff, "darkslategray2" => 0x8deeee, "darkslategray3" => 0x79cdcd, "darkslategray4" => 0x528b8b, "aquamarine1" => 0x7fffd4, "aquamarine2" => 0x76eec6, "aquamarine3" => 0x66cdaa, "aquamarine4" => 0x458b74, "darkseagreen1" => 0xc1ffc1, "darkseagreen2" => 0xb4eeb4, "darkseagreen3" => 0x9bcd9b, "darkseagreen4" => 0x698b69, "seagreen1" => 0x54ff9f, "seagreen2" => 0x4eee94, "seagreen3" => 0x43cd80, "seagreen4" => 0x2e8b57, "palegreen1" => 0x9aff9a, "palegreen2" => 0x90ee90, "palegreen3" => 0x7ccd7c, "palegreen4" => 0x548b54, "springgreen1" => 0x00ff7f, "springgreen2" => 0x00ee76, "springgreen3" => 0x00cd66, "springgreen4" => 0x008b45, "green1" => 0x00ff00, "green2" => 0x00ee00, "green3" => 0x00cd00, "green4" => 0x008b00, "chartreuse1" => 0x7fff00, "chartreuse2" => 0x76ee00, "chartreuse3" => 0x66cd00, "chartreuse4" => 0x458b00, "olivedrab1" => 0xc0ff3e, "olivedrab2" => 0xb3ee3a, "olivedrab3" => 0x9acd32, "olivedrab4" => 0x698b22, "darkolivegreen1" => 0xcaff70, "darkolivegreen2" => 0xbcee68, "darkolivegreen3" => 0xa2cd5a, "darkolivegreen4" => 0x6e8b3d, "khaki1" => 0xfff68f, "khaki2" => 0xeee685, "khaki3" => 0xcdc673, "khaki4" => 0x8b864e, "lightgoldenrod1" => 0xffec8b, "lightgoldenrod2" => 0xeedc82, "lightgoldenrod3" => 0xcdbe70, "lightgoldenrod4" => 0x8b814c, "lightyellow1" => 0xffffe0, "lightyellow2" => 0xeeeed1, "lightyellow3" => 0xcdcdb4, "lightyellow4" => 0x8b8b7a, "yellow1" => 0xffff00, "yellow2" => 0xeeee00, "yellow3" => 0xcdcd00, "yellow4" => 0x8b8b00, "gold1" => 0xffd700, "gold2" => 0xeec900, "gold3" => 0xcdad00, "gold4" => 0x8b7500, "goldenrod1" => 0xffc125, "goldenrod2" => 0xeeb422, "goldenrod3" => 0xcd9b1d, "goldenrod4" => 0x8b6914, "darkgoldenrod1" => 0xffb90f, "darkgoldenrod2" => 0xeead0e, "darkgoldenrod3" => 0xcd950c, "darkgoldenrod4" => 0x8b6508, "rosybrown1" => 0xffc1c1, "rosybrown2" => 0xeeb4b4, "rosybrown3" => 0xcd9b9b, "rosybrown4" => 0x8b6969, "indianred1" => 0xff6a6a, "indianred2" => 0xee6363, "indianred3" => 0xcd5555, "indianred4" => 0x8b3a3a, "sienna1" => 0xff8247, "sienna2" => 0xee7942, "sienna3" => 0xcd6839, "sienna4" => 0x8b4726, "burlywood1" => 0xffd39b, "burlywood2" => 0xeec591, "burlywood3" => 0xcdaa7d, "burlywood4" => 0x8b7355, "wheat1" => 0xffe7ba, "wheat2" => 0xeed8ae, "wheat3" => 0xcdba96, "wheat4" => 0x8b7e66, "tan1" => 0xffa54f, "tan2" => 0xee9a49, "tan3" => 0xcd853f, "tan4" => 0x8b5a2b, "chocolate1" => 0xff7f24, "chocolate2" => 0xee7621, "chocolate3" => 0xcd661d, "chocolate4" => 0x8b4513, "firebrick1" => 0xff3030, "firebrick2" => 0xee2c2c, "firebrick3" => 0xcd2626, "firebrick4" => 0x8b1a1a, "brown1" => 0xff4040, "brown2" => 0xee3b3b, "brown3" => 0xcd3333, "brown4" => 0x8b2323, "salmon1" => 0xff8c69, "salmon2" => 0xee8262, "salmon3" => 0xcd7054, "salmon4" => 0x8b4c39, "lightsalmon1" => 0xffa07a, "lightsalmon2" => 0xee9572, "lightsalmon3" => 0xcd8162, "lightsalmon4" => 0x8b5742, "orange1" => 0xffa500, "orange2" => 0xee9a00, "orange3" => 0xcd8500, "orange4" => 0x8b5a00, "darkorange1" => 0xff7f00, "darkorange2" => 0xee7600, "darkorange3" => 0xcd6600, "darkorange4" => 0x8b4500, "coral1" => 0xff7256, "coral2" => 0xee6a50, "coral3" => 0xcd5b45, "coral4" => 0x8b3e2f, "tomato1" => 0xff6347, "tomato2" => 0xee5c42, "tomato3" => 0xcd4f39, "tomato4" => 0x8b3626, "orangered1" => 0xff4500, "orangered2" => 0xee4000, "orangered3" => 0xcd3700, "orangered4" => 0x8b2500, "red1" => 0xff0000, "red2" => 0xee0000, "red3" => 0xcd0000, "red4" => 0x8b0000, "deeppink1" => 0xff1493, "deeppink2" => 0xee1289, "deeppink3" => 0xcd1076, "deeppink4" => 0x8b0a50, "hotpink1" => 0xff6eb4, "hotpink2" => 0xee6aa7, "hotpink3" => 0xcd6090, "hotpink4" => 0x8b3a62, "pink1" => 0xffb5c5, "pink2" => 0xeea9b8, "pink3" => 0xcd919e, "pink4" => 0x8b636c, "lightpink1" => 0xffaeb9, "lightpink2" => 0xeea2ad, "lightpink3" => 0xcd8c95, "lightpink4" => 0x8b5f65, "palevioletred1" => 0xff82ab, "palevioletred2" => 0xee799f, "palevioletred3" => 0xcd6889, "palevioletred4" => 0x8b475d, "maroon1" => 0xff34b3, "maroon2" => 0xee30a7, "maroon3" => 0xcd2990, "maroon4" => 0x8b1c62, "violetred1" => 0xff3e96, "violetred2" => 0xee3a8c, "violetred3" => 0xcd3278, "violetred4" => 0x8b2252, "magenta1" => 0xff00ff, "magenta2" => 0xee00ee, "magenta3" => 0xcd00cd, "magenta4" => 0x8b008b, "orchid1" => 0xff83fa, "orchid2" => 0xee7ae9, "orchid3" => 0xcd69c9, "orchid4" => 0x8b4789, "plum1" => 0xffbbff, "plum2" => 0xeeaeee, "plum3" => 0xcd96cd, "plum4" => 0x8b668b, "mediumorchid1" => 0xe066ff, "mediumorchid2" => 0xd15fee, "mediumorchid3" => 0xb452cd, "mediumorchid4" => 0x7a378b, "darkorchid1" => 0xbf3eff, "darkorchid2" => 0xb23aee, "darkorchid3" => 0x9a32cd, "darkorchid4" => 0x68228b, "purple1" => 0x9b30ff, "purple2" => 0x912cee, "purple3" => 0x7d26cd, "purple4" => 0x551a8b, "mediumpurple1" => 0xab82ff, "mediumpurple2" => 0x9f79ee, "mediumpurple3" => 0x8968cd, "mediumpurple4" => 0x5d478b, "thistle1" => 0xffe1ff, "thistle2" => 0xeed2ee, "thistle3" => 0xcdb5cd, "thistle4" => 0x8b7b8b, "gray0" => 0x000000, "grey0" => 0x000000, "gray1" => 0x030303, "grey1" => 0x030303, "gray2" => 0x050505, "grey2" => 0x050505, "gray3" => 0x080808, "grey3" => 0x080808, "gray4" => 0x0a0a0a, "grey4" => 0x0a0a0a, "gray5" => 0x0d0d0d, "grey5" => 0x0d0d0d, "gray6" => 0x0f0f0f, "grey6" => 0x0f0f0f, "gray7" => 0x121212, "grey7" => 0x121212, "gray8" => 0x141414, "grey8" => 0x141414, "gray9" => 0x171717, "grey9" => 0x171717, "gray10" => 0x1a1a1a, "grey10" => 0x1a1a1a, "gray11" => 0x1c1c1c, "grey11" => 0x1c1c1c, "gray12" => 0x1f1f1f, "grey12" => 0x1f1f1f, "gray13" => 0x212121, "grey13" => 0x212121, "gray14" => 0x242424, "grey14" => 0x242424, "gray15" => 0x262626, "grey15" => 0x262626, "gray16" => 0x292929, "grey16" => 0x292929, "gray17" => 0x2b2b2b, "grey17" => 0x2b2b2b, "gray18" => 0x2e2e2e, "grey18" => 0x2e2e2e, "gray19" => 0x303030, "grey19" => 0x303030, "gray20" => 0x333333, "grey20" => 0x333333, "gray21" => 0x363636, "grey21" => 0x363636, "gray22" => 0x383838, "grey22" => 0x383838, "gray23" => 0x3b3b3b, "grey23" => 0x3b3b3b, "gray24" => 0x3d3d3d, "grey24" => 0x3d3d3d, "gray25" => 0x404040, "grey25" => 0x404040, "gray26" => 0x424242, "grey26" => 0x424242, "gray27" => 0x454545, "grey27" => 0x454545, "gray28" => 0x474747, "grey28" => 0x474747, "gray29" => 0x4a4a4a, "grey29" => 0x4a4a4a, "gray30" => 0x4d4d4d, "grey30" => 0x4d4d4d, "gray31" => 0x4f4f4f, "grey31" => 0x4f4f4f, "gray32" => 0x525252, "grey32" => 0x525252, "gray33" => 0x545454, "grey33" => 0x545454, "gray34" => 0x575757, "grey34" => 0x575757, "gray35" => 0x595959, "grey35" => 0x595959, "gray36" => 0x5c5c5c, "grey36" => 0x5c5c5c, "gray37" => 0x5e5e5e, "grey37" => 0x5e5e5e, "gray38" => 0x616161, "grey38" => 0x616161, "gray39" => 0x636363, "grey39" => 0x636363, "gray40" => 0x666666, "grey40" => 0x666666, "gray41" => 0x696969, "grey41" => 0x696969, "gray42" => 0x6b6b6b, "grey42" => 0x6b6b6b, "gray43" => 0x6e6e6e, "grey43" => 0x6e6e6e, "gray44" => 0x707070, "grey44" => 0x707070, "gray45" => 0x737373, "grey45" => 0x737373, "gray46" => 0x757575, "grey46" => 0x757575, "gray47" => 0x787878, "grey47" => 0x787878, "gray48" => 0x7a7a7a, "grey48" => 0x7a7a7a, "gray49" => 0x7d7d7d, "grey49" => 0x7d7d7d, "gray50" => 0x7f7f7f, "grey50" => 0x7f7f7f, "gray51" => 0x828282, "grey51" => 0x828282, "gray52" => 0x858585, "grey52" => 0x858585, "gray53" => 0x878787, "grey53" => 0x878787, "gray54" => 0x8a8a8a, "grey54" => 0x8a8a8a, "gray55" => 0x8c8c8c, "grey55" => 0x8c8c8c, "gray56" => 0x8f8f8f, "grey56" => 0x8f8f8f, "gray57" => 0x919191, "grey57" => 0x919191, "gray58" => 0x949494, "grey58" => 0x949494, "gray59" => 0x969696, "grey59" => 0x969696, "gray60" => 0x999999, "grey60" => 0x999999, "gray61" => 0x9c9c9c, "grey61" => 0x9c9c9c, "gray62" => 0x9e9e9e, "grey62" => 0x9e9e9e, "gray63" => 0xa1a1a1, "grey63" => 0xa1a1a1, "gray64" => 0xa3a3a3, "grey64" => 0xa3a3a3, "gray65" => 0xa6a6a6, "grey65" => 0xa6a6a6, "gray66" => 0xa8a8a8, "grey66" => 0xa8a8a8, "gray67" => 0xababab, "grey67" => 0xababab, "gray68" => 0xadadad, "grey68" => 0xadadad, "gray69" => 0xb0b0b0, "grey69" => 0xb0b0b0, "gray70" => 0xb3b3b3, "grey70" => 0xb3b3b3, "gray71" => 0xb5b5b5, "grey71" => 0xb5b5b5, "gray72" => 0xb8b8b8, "grey72" => 0xb8b8b8, "gray73" => 0xbababa, "grey73" => 0xbababa, "gray74" => 0xbdbdbd, "grey74" => 0xbdbdbd, "gray75" => 0xbfbfbf, "grey75" => 0xbfbfbf, "gray76" => 0xc2c2c2, "grey76" => 0xc2c2c2, "gray77" => 0xc4c4c4, "grey77" => 0xc4c4c4, "gray78" => 0xc7c7c7, "grey78" => 0xc7c7c7, "gray79" => 0xc9c9c9, "grey79" => 0xc9c9c9, "gray80" => 0xcccccc, "grey80" => 0xcccccc, "gray81" => 0xcfcfcf, "grey81" => 0xcfcfcf, "gray82" => 0xd1d1d1, "grey82" => 0xd1d1d1, "gray83" => 0xd4d4d4, "grey83" => 0xd4d4d4, "gray84" => 0xd6d6d6, "grey84" => 0xd6d6d6, "gray85" => 0xd9d9d9, "grey85" => 0xd9d9d9, "gray86" => 0xdbdbdb, "grey86" => 0xdbdbdb, "gray87" => 0xdedede, "grey87" => 0xdedede, "gray88" => 0xe0e0e0, "grey88" => 0xe0e0e0, "gray89" => 0xe3e3e3, "grey89" => 0xe3e3e3, "gray90" => 0xe5e5e5, "grey90" => 0xe5e5e5, "gray91" => 0xe8e8e8, "grey91" => 0xe8e8e8, "gray92" => 0xebebeb, "grey92" => 0xebebeb, "gray93" => 0xededed, "grey93" => 0xededed, "gray94" => 0xf0f0f0, "grey94" => 0xf0f0f0, "gray95" => 0xf2f2f2, "grey95" => 0xf2f2f2, "gray96" => 0xf5f5f5, "grey96" => 0xf5f5f5, "gray97" => 0xf7f7f7, "grey97" => 0xf7f7f7, "gray98" => 0xfafafa, "grey98" => 0xfafafa, "gray99" => 0xfcfcfc, "grey99" => 0xfcfcfc, "gray100" => 0xffffff, "grey100" => 0xffffff, "darkgrey" => 0xa9a9a9, "darkgray" => 0xa9a9a9, "darkblue" => 0x00008b, "darkcyan" => 0x008b8b, "darkmagenta" => 0x8b008b, "darkred" => 0x8b0000, "lightgreen" => 0x90ee90, "crimson" => 0xdc143c, "indigo" => 0x4b0082, "olive" => 0x808000, "rebeccapurple" => 0x663399, "silver" => 0xc0c0c0, "teal" => 0x008080, }; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Graphics::ColorNames::X - X-Windows color names and equivalent RGB values =head1 VERSION version v3.5.0 =head1 SYNOPSIS require Graphics::ColorNames::X; $NameTable = Graphics::ColorNames::X->NamesRgbTable(); $RgbBlack = $NameTable->{black}; =head1 DESCRIPTION This module defines color names and their associated RGB values used in X-Windows. It is based on the 2014 version of the F file, which includes colors from CSS4. =head1 SEE ALSO L L L =head1 SOURCE The development version is on github at L and may be cloned from L =head1 BUGS Please report any bugs or feature requests on the bugtracker website L or by email to L. When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 AUTHOR Robert Rothenberg =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2001-2019 by Robert Rothenberg. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut Graphics-ColorNames-v3.5.0/MANIFEST.SKIP0000644000175000017500000000224613476273563015257 0ustar rrrr.*~$ .*\.(bak|old)$ \.git/.* \.gitignore # Begin standard Module::Manifest::Skip list: # ExtUtils::MakeMaker ^blib/ ^blibdirs$ ^blibdirs\.ts$ ^bpm_to_blib\.ts$ ^Makefile$ ^Makefile\.old$ ^MakeMaker-\d ^MANIFEST\.bak$ # ^MANIFEST\.SKIP$ ^MYMETA\. ^pm_to_blib$ ^pod2htm.* # Module::Build ^Build$ ^_build/ ^Build.bat$ ^Build.COM$ ^BUILD.COM$ ^build.com$ # Revision Control \bCVS\b \b.cvsignore\b \b_darcs\b \B\.git\b \B\.gitignore\b \B\.gitmodules\b \B\.hg\b \B\.hgignore\b \B\.hgtags\b \bRCS\b \bSCCS\b \B\.svn\b ,v$ ,B$ ,D$ \baegis.log$ # Author Extras ^inc/.*\.pod$ ^pkg/ # ^xt/ # ^dist.ini$ # Editors ~$ \#$ \b\.# \.kpf$ \.sw[pmno]$ ^\.vimrc$ # OS X \.DS_Store$ ^\.Trash/ \B\._ # VMS \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Development ^benchmarks/ ^core$ ^cover_db\b ^covered\b ^debian/ ^devel\. ^.devel-local$ ^out$ ^tmon.out$ ^old/ ^Old/ # Author Notes ^notes ^todo ^ToDo$ # Common Junk Files \.bak$ \.diff$ ^foo\b.* \.old$ \.orig$ \.patch$ \.rej$ \.tdy$ \.tmp$ ^\w$ \.ttc$ \.pmc$ # Added by Dist::Zilla::Plugin::Generate::ManifestSkip \.build/ Graphics-ColorNames-.*/ Graphics-ColorNames-.*\.tar\.gz \.mailmap$ perltidy\.(LOG|ERR) fatlib/ cpanfile\.snapshot$ local/ Graphics-ColorNames-v3.5.0/t-etc/0000775000175000017500000000000013476273563014373 5ustar rrrrGraphics-ColorNames-v3.5.0/t-etc/rgb.txt0000755000175000017500000000034013476273563015704 0ustar rrrr# based on $Xorg: rgb.txt,v 1.3 2000/08/17 ! another comment 255 250 250 one 248 248 255 two 248 248 255 three 245 245 245 four ! trailing spaces 245 245 245 five ! spaces instead of tabs: 220 220 220 six Graphics-ColorNames-v3.5.0/dist.ini0000644000175000017500000000513313476273563015023 0ustar rrrrname = Graphics-ColorNames author = Robert Rothenberg license = Artistic_2_0 copyright_holder = Robert Rothenberg copyright_year = 2001-2019 [Keywords] keyword = color [Meta::Contributors] contributor = Alan D. Salewski contributor = Steve Pomeroy contributor = "chemboy" contributor = Magnus Cedergren contributor = Gary Vollink contributor = Claus Färber contributor = Andreas J. König contributor = Slaven Rezić [GatherDir] exclude_match = cpanfile* exclude_filename = MANIFEST.SKIP [PruneCruft] [CPANFile] [License] [ExtraTests] [ExecDir] [ShareDir] [MakeMaker] [Manifest] [TestRelease] [ConfirmRelease] [UploadToCPAN] [RecommendedPrereqs] [AutoPrereqs] [RemovePrereqs] remove = strict remove = warnings remove = integer remove = base remove = Carp remove = File::Spec::Functions [EnsurePrereqsInstalled] :version = 0.003 type = requires type = recommends [GitHub::Meta] repo = git://github.com/robrwo/Graphics-ColorNames.git [MetaResources] bugtracker.web = https://rt.cpan.org/Public/Dist/Display.html?Name=Graphics-ColorNames bugtracker.mailto = bug-Graphics-ColorNames@rt.cpan.org [PodWeaver] [ReadmeAnyFromPod] type = gfm filename = README.md location = build [CopyFilesFromBuild] copy = README.md copy = cpanfile copy = MANIFEST.SKIP [Generate::ManifestSkip] :version = v0.1.5 [PruneFiles] match = ~$ [Metadata] x_authority = cpan:RRWO [MetaProvides::Package] [MetaJSON] [MetaYAML] [InstallGuide] [Prereqs] Exporter = 5.57 [Prereqs / TestRequires ] ; authordep Pod::Weaver::Plugin::AppendPrepend ; authordep Pod::Weaver::Section::Contributors ; authordep Pod::Weaver::Section::SourceGitHub [PodSyntaxTests] [Test::CheckManifest] ;;[Test::CleanNamespaces] [Test::EOF] [Test::EOL] :version = 0.14 [Test::Fixme] [Test::MinimumVersion] [Test::NoTabs] ;;[Test::Perl::Critic] ;;critic_config = t/etc/perlcritic.rc ;;[Test::Pod::Coverage::Configurable] [Test::Pod::LinkCheck] [Test::Portability] ; authordep Test::TrailingSpace [Test::TrailingSpace] filename_regex = \.(?:p[lm]|pod)\z ;; [Test::Kwalitee] [Test::ReportPrereqs] :version = 0.022 version_extractor = Module::Metadata verify_prereqs = 1 [@Git] allow_dirty = dist.ini push_to = origin master:master tag_format = %v commit_msg = %v%n%n%c [Git::Contributors] :version = 0.019 [RewriteVersion] [NextRelease] [BumpVersionAfterRelease] [Git::Commit / Commit_Changes] ; commit Changes (for new dev) allow_dirty_match = ^lib/ commit_msg = Commit Changes and bump $VERSION Graphics-ColorNames-v3.5.0/Changes0000644000175000017500000002421113476273563014650 0ustar rrrrRevision history for Graphics-ColorNames: v3.5.0 2019-06-06 21:28:32+01:00 Europe/London [Incompatabilities] - Bumped minimum prerequisite to Perl v5.10. [Documentation] - Corrected typo. - Updated copyright year. v3.4.0 2018-11-18 19:12:44+00:00 Europe/London [Incompatabilities] - Autoloaded color name methods were removed. v3.3.4 2018-11-11 15:12:53+00:00 Europe/London [Documentation] - Added a ROADMAP section for planned changes. [Toolchain] - Tweaks to dist.ini. v3.3.3 2018-10-27 19:31:14+01:00 Europe/London [Documentation] - Fix typo in GCN::X POD. v3.3.2 2018-10-27 17:32:56+01:00 Europe/London [Bug Fixes] - Fix VERSION class method, RT 127301. [Toolchain] - Tweaks to dist.ini for simplifying build. v3.3.1 2018-10-24 16:03:19+01:00 Europe/London [Tests] - Fixed text dependencies on modules that have been moved to separate distributions, RT 127430. v3.3.0 2018-10-23 21:29:56+01:00 Europe/London [Incompatabilities] - The GCN::HTML and GCN::Windows schemes have been removed and released as separate modules. - The prefix is now ignored for hex method for invalid color names. [Bug Fixes] - Removed undef warning for unknown color names in hex and rgb methods. [Documentation] - Reorganized the documentation. - Documented handling of unknown color names in hex and rgb methods. - Added INSTALL file to the distribution. [Tests] - Reorganized and improved tests. [Other] - The tied and autoloading interfaces are deprecated. - Added contributor to module metadata. v3.2.1 2018-10-06 10:59:36+01:00 Europe/London [Bug Fixes] - Fix VERSION, RT 127301. v3.2.0 2018-10-04 00:35:01+01:00 Europe/London [Bug Fixes] - Pass through RGB hexidecimals prefixed by "0x", as claimed by the documentation. - Fix ambiguity between modiles and filenames, RT 54500. - Schema modules can be in any namespace. [Enhancements] - GCN::X color scheme updated to 2014-07-06 version. [Incompatabilities] - Filenames must now be absolute. [Tests] - Minor improvement in style of some tests. v3.1.2 2018-10-01 23:14:34+01:00 Europe/London [Tests] - Removed dependency on GCN::Netscape, RT 127258. v3.1.1 2018-10-01 17:49:09+01:00 Europe/London [Documentation] - Added note that the HTML color scheme is deprecated. [Bug Fixes] - Regexes test for ASCII digits only. v3.1.0 2018-09-30 13:37:11+01:00 Europe/London [Incompatabilities] - The Netscape color scheme has been split out into a separate release. [Documentation] - Use modern syntax in some of the examples. - Updated contributor names. v3.0.2 2018-09-28 17:54:49+01:00 Europe/London [Documentation] - Identify how to report bugs. - Add note about the old SourceForge project for this module. - Fixed abstract for Netscape module. [Other] - Tagged release with the RT bug database. - Removed Windows line endings. v3.0.1 2018-09-28 13:39:19+01:00 Europe/London [Documentation] - Added omitted Changes to v3.0.0. [Tests] - Removed unnecessary version tests. [Toolchain] - Use newer style of module exports. [Other] - Perltidied source. v3.0.0 2018-09-28 00:00:12+01:00 Europe/London [Documentation] - Reformated Changes file. - POD is built using Pod::Weaver. - Removed outdated sections from POD. - Added additional module(s) to SEE ALSO section. [Tests] - Removed QA tests that are handled by Dist::Zilla. [Toolchain] - Use Dist::Zilla to build distribution. [Other Changes] - Corrected typo in comment. - Cleaned up whitespace in the source code. 2.11 2008-01-10 - updated version number for release - minor changes of text format - added fix for problems with Graphics::ColorNames::GrayScale 2.10_05 2008-01-08 - checks if modules already loaded before re-loading them (uses Module::Loaded for this) - requires changed to load for dynamically loaded modules - updated README 2.10_04 2008-01-06 - reverted back to standard object-oriented style - Tie::Sub is only loaded when a subroutine is used for scheme 2.10_03 2008-01-05 - tests use Test::Exception to catch errors - rewrite parts of documentation to emphasize object-oriented interface rather than the tied interface - implemented a proper DESTROY method - misc code cleanup and reorganization 2.10_02 2008-01-04 - added support for Color::Library dictionaries - minor changes to error messages - underscores in color names ignored - auto-loading color names in object-oriented interface, e.g. $obj->black() - stubs for DESTROY and UNTIE methods - 06-obj.t test more flexible - pointless 01-ColourNames test removed - more updates to documentation 2.10_01 2007-12-20 - non-word characters (spaces, punctuation) now ignored in color names - smarter handling of comments in rgb.txt files - significant rewrite to parts of the code, requires Tie::Sub - rewritten how FIRSTKEY and NEXTKEY methods work - better error handling - minor updates to documentation - typos in comments - added better checking for minimum Perl version reqs - added aliaes w/out punctuation in Netscape scheme 2.04 2007-12-17 - fixed inconsistencies in Netscape color scheme 2.03 2007-12-17 - fixed glitch with version test - cleaned up format of text files - removed unneeded dependency 2.02 Sun Dec 16 2007 - renamed developer-related test scripts - removed 90-prereqs.t (it wasn't working properly sometimes) - added DEVEL_TESTS environment variable as requirement for developer tests - README generated from POD using Pod::Readme 2.01 2007-12-16 - Changed versions of specific color schemes to match main module - Removed Graphics::ColourNames from the distribution - updated documentation for Netscape.pm 2.0_04 2006-10-24 - fixed Pod::Coverage tests (RT#20923) - various optimizations - changed to use inside-out object scheme - no longer signing code (too many problems w/Module::Signature) 2.0_03 2005-04-08 - fixed bug with reading scheme from FileHandle type - fixed glitch in pod-coverage test - corrected version in Graphics::ColourNames - added tests to check versions in sync 2.0_02 2005-04-07 - lesser-used routines made into autoloaded methods - added Test::Portabiity::Files test - minor updates for Netscape theme - added support for :utility export tag - added support for :all export tag 2.0_01 2005-04-04 - removed DSLIP information from POD, since it has little meaning - tweaked code - color scheme can be a module name - fixed bug in Pod::Coverage test, uses Test::Pod::Coverage - major change in how schemes are stored, which affects priority when CODE scheme types are used - can load rgb.txt from GLOB, FileHandle or IO::File - references can be specified as possible schemes in constructor - added public load_scheme method - various optimizations and tweaks - IO::File is loaded only as needed - rgb.txt file must be radable to be loaded - tweaked tests - RGB passthrough now consistently returns lowercase values - minor optimization in FETCH for RGB passthrough - added all_schemes function to query schemes 1.06 2005-03-29 - cleaned up tests - added DSLIP information to POD - added Test::Pod tests - added Pod::Coverage tests - minor documentation changes - uses Test::Prereq to test distro prereqs - added SIGNATURE to distribution 1.05 2004-09-04 - correction to Graphics::ColourNames - correction to README 1.04 2004-09-03 - updates to POD - a filehandle for a rgb.txt file can be specified 1.03 2004-08-26 - hooks to support CODE scheme types (as with module Graphics::ColorNames::GrayScale 2.00) - ColourNames.pm has same version of ColorNames.pm 1.02 2004-08-24 - added Graphics::ColourNames alias - minor changes to ColorNames.pm 1.01 2004-08-18 - corrected typo in REQUIREMENTS (wrong Perl version) - uses Module::Load for improved dynamic loading - EXISTS works across multiple color schemes - bug in FETCH that returned key has been fixed 1.00 2004-07-31 - changed version to 1.00 as release appears to be stable - corrected bad link in POD 0.39_04 2004-07-26 - rebuilt distribution with proper META.yml 0.39_03 2004-07-22 - added required rgb.txt for tests to MANIFEST and distro 0.39_02 2004-07-22 - now requires Perl 5.6.0 - uses IO::File - option to parse an rgb.txt file - removed TODO from distribution - Netscape.pm, HTML.pm and Windows.pm warnings enabled - additions and corrections in POD 0.39_01 2004-07-21 - added Build.PL to distribution - added hex() and rgb() methods - created object-oriented interface - additions and corrections in POD 0.32 2002-12-05 - fixed inconsistencies with grey/gray spellings in X.pm - added note in POD about using rt.cpan.org for bug reports - minor changes in POD for Netscape.pm - added TODO file 0.31 2002-10-23 - fixed mispelling of "fuchsia" in HTML.pm 0.30 2001-10-04 - fixed bug with non-existent color names - corrected some typos in and updated the documentation - added multiple color naming schemes - when passed a value in the form of '#000000', returns that value 0.24 2001-04-28 - fixed colors in X.pm (such as some 'green') defined as 0x000000 - removed duplicate grays (ie, 'gray0') from X.pm - renamed test suite files to enforce testing order - v0.23 mistakenly dated 17 Mar instead of 17 April 0.23 2001-04-17 - X-Windows color names now from rgb.txt (includes names with spaces, such as 'alice blue' as well as 'aliceblue') - Added Netscape color naming scheme 0.22 2001-03-15 - added example on how to add your own naming schema - schema files (X.pm, HTML.pm, Windows.pm) were stored in the wrong subdirectories - removed test.pl and double-testing 0.21 2001-03-12 - fixed an issue with Test::Harness expecting t/*.t tests 0.20 2001-03-11 - no longer a Tie::Hash - additional example in POD - added Test::Harness and a better test suite - commented-out 'use warnings' in modules - addition of tuple2hex function - changed the way files are included in the distribution 0.10 2001-02-19 - original (experimental) version released Graphics-ColorNames-v3.5.0/weaver.ini0000644000175000017500000000053113476273563015346 0ustar rrrr[@CorePrep] [-SingleEncoding] ;; [-Transformer] ;; transformer = List [Name] [Version] [Region / prelude] [Generic / SYNOPSIS] [Generic / DESCRIPTION] [Collect / METHODS] command = method [Collect / EXPORTS] command = export [Leftovers] [Region / postlude] [SourceGitHub] [Bugs] [Authors] [Contributors] [Legal] [-AppendPrepend] Graphics-ColorNames-v3.5.0/INSTALL0000644000175000017500000000440413476273563014410 0ustar rrrrThis is the Perl distribution Graphics-ColorNames. Installing Graphics-ColorNames is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Graphics::ColorNames If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Graphics::ColorNames ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, install configure prerequisites (see below), then build it: % perl Makefile.PL % make && make test Then install it: % make install On Windows platforms, you should use `dmake` or `nmake`, instead of `make`. If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Makefile.PL. Look for prerequisites in the following phases: * to run make, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation Graphics-ColorNames documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc Graphics::ColorNames For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html Graphics-ColorNames-v3.5.0/cpanfile0000644000175000017500000000175013476273563015064 0ustar rrrrrequires "Exporter" => "5.57"; requires "Module::Load" => "0.10"; requires "Module::Loaded" => "0"; requires "perl" => "v5.10.0"; requires "version" => "0"; on 'test' => sub { requires "File::Spec" => "0"; requires "FileHandle" => "0"; requires "IO::File" => "0"; requires "Module::Metadata" => "0"; requires "Test::Exception" => "0"; requires "Test::More" => "0"; requires "Test::Most" => "0"; requires "constant" => "0"; requires "lib" => "0"; requires "perl" => "v5.10.0"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; }; on 'develop' => sub { requires "Test::EOF" => "0"; requires "Test::EOL" => "0"; requires "Test::MinimumVersion" => "0"; requires "Test::More" => "0.88"; requires "Test::NoTabs" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::LinkCheck" => "0"; requires "Test::Portability::Files" => "0"; requires "Test::TrailingSpace" => "0.0203"; }; Graphics-ColorNames-v3.5.0/README.md0000644000175000017500000002121413476273563014634 0ustar rrrr# NAME Graphics::ColorNames - defines RGB values for common color names # VERSION version v3.5.0 # SYNOPSIS ```perl use Graphics::ColorNames; use Graphics::ColorNames::WWW; $pal = Graphics::ColorNames->new( qw[ X WWW ] ); $rgb = $pal->hex('green'); # returns '00ff00' $rgb = $pal->hex('green', '0x'); # returns '0x00ff00' $rgb = $pal->hex('green', '#'); # returns '#00ff00' $rgb = $pal->rgb('green'); # returns '0,255,0' @rgb = $pal->rgb('green'); # returns (0, 255, 0) ``` # DESCRIPTION This module provides a common interface for obtaining the RGB values of colors by standard names. The intention is to (1) provide a common module that authors can use with other modules to specify colors by name; and (2) free module authors from having to "re-invent the wheel" whenever they decide to give the users the option of specifying a color by name rather than RGB value. # METHODS ## `new` The constructor is as follows: ```perl my $pal = Graphics::ColorNames->new( @schemes ); ``` where `@schemes` is an array of color schemes (palettes, dictionaries). A valid color scheme may be the name of a color scheme (such as `X` or a full module name such as `Graphics::ColorNames::X`), a reference to a color scheme hash or subroutine, or to the path or open filehandle for a `rgb.txt` file. If none are specified, it uses the default `X` color scheme, which corresponds to the X-Windows `rgb.txt` colors. For most purposes, this is good enough. Since v3.2.0, it was updated to use the 2014-07-06 colors, so includes the standard CSS colors as well. Other color schemes are available on CPAN, e.g. [Graphics::ColorNames::WWW](https://metacpan.org/pod/Graphics::ColorNames::WWW). Since version 2.1002, [Color::Library](https://metacpan.org/pod/Color::Library) dictionaries can be used as well: ```perl my $pal = Graphics::ColorNames->new( 'Color::Library::Dictionary::HTML' ); ``` ## `rgb` ``` @rgb = $pal->rgb($name); $rgb = $pal->rgb($name, $separator); ``` If called in a list context, returns a triplet. If called in a scalar context, returns a string separated by an optional separator (which defauls to a comma). For example, ``` @rgb = $pal->rgb('blue'); # returns (0, 0, 255) $rgb = $pal->rgb('blue', ','); # returns "0,0,255" ``` Unknown color names return empty lists or strings, depending on the context. Color names are case insensitive, and spaces or punctuation are ignored. So "Alice Blue" returns the same value as "aliceblue", "ALICE-BLUE" and "a\*lICEbl-ue". (If you are using color names based on user input, you should add additional validation of the color names.) The value returned is in the six-digit hexidecimal format used in HTML and CSS (without the initial '#'). To convert it to separate red, green, and blue values (between 0 and 255), use the ["hex2tuple"](#hex2tuple) function. You may also specify an absolute filename as a color scheme, if the file is in the same format as the standard `rgb.txt` file. ## `hex` ``` $hex = $pal->hex($name, $prefix); ``` Returns a 6-digit hexidecimal RGB code for the color. If an optional prefix is specified, it will prefix the code with that string. For example, ``` $hex = $pal->hex('blue', '#'); # returns "#0000ff" ``` If the color does not exist, it will return an empty string. A hexidecimal RGB value in the form of `#RRGGBB`, `0xRRGGBB` or `RRGGBB` will return itself: ``` $color = $pal->hex('#123abc'); # returns '123abc' ``` ## autoloaded color name methods Autoloaded color name methods were removed in v3.4.0. ## `load_scheme` ``` $pal->load_scheme( $scheme ); ``` This dynamically loads a color scheme, which can be either a hash reference or code reference. # EXPORTS ## `all_schemes` ```perl my @schemes = all_schemes(); ``` Returns a list of all available color schemes installed on the machine in the `Graphics::ColorNames` namespace. The order has no significance. ## `hex2tuple` Converts a hexidecimal string to a tuple. ## `tuple2hex` Converts a tuple to a hexidecimal string. # TIED INTERFACE The standard interface (prior to version 0.40) was through a tied hash: ``` tie %pal, 'Graphics::ColorNames', qw[ X WWW ]; ``` This interface is deprecated, and will be moved to a separate module in the future. # CUSTOM COLOR SCHEMES You can add naming scheme files by creating a Perl module is the name `Graphics::ColorNames::SCHEMENAME` which has a subroutine named `NamesRgbTable` that returns a hash of color names and RGB values. (Schemes with a different base namespace will require the fill namespace to be given.) The color names must be in all lower-case, and the RGB values must be 24-bit numbers containing the red, green, and blue values in most- significant to least- significant byte order. An example naming schema is below: ```perl package Graphics::ColorNames::Metallic; sub NamesRgbTable() { use integer; return { copper => 0xb87333, gold => 0xcd7f32, silver => 0xe6e8fa, }; } ``` You would use the above schema as follows: ``` tie %colors, 'Graphics::ColorNames', 'Metallic'; ``` The behavior of specifying multiple keys with the same name is undefined as to which one takes precedence. As of version 2.10, case, spaces and punctuation are ignored in color names. So a name like "Willy's Favorite Shade-of-Blue" is treated the same as "willysfavoroteshadeofblue". (If your scheme does not include duplicate entrieswith spaces and punctuation, then the minimum version of [Graphics::ColorNames](https://metacpan.org/pod/Graphics::ColorNames) should be 2.10 in your requirements.) An example of an additional module is the [Graphics::ColorNames::Mozilla](https://metacpan.org/pod/Graphics::ColorNames::Mozilla) module. Since version 1.03, `NamesRgbTable` may also return a code reference: ```perl package Graphics::ColorNames::Orange; sub NamesRgbTable() { return sub { my $name = shift; return 0xffa500; }; } ``` See [Graphics::ColorNames::GrayScale](https://metacpan.org/pod/Graphics::ColorNames::GrayScale) for an example. # ROADMAP The following changes are planned in the future: - The tied interface will be removed, but implemented in a separate module for users that wish to use it. - The namespace for color schemes will be moved to the `Graphics::ColorNames::Schemes` but options will be added to use the existing scheme. This will allow modules to be named like `Graphics::ColorNames::Tied` without being confused for color schemes. - This module will be rewritten to be a [Moo](https://metacpan.org/pod/Moo)-based class. # SEE ALSO [Color::Library](https://metacpan.org/pod/Color::Library) provides an extensive library of color schemes. A notable difference is that it supports more complex schemes which contain additional information about individual colors and map multiple colors to a single name. [Color::Rgb](https://metacpan.org/pod/Color::Rgb) has a similar function to this module, but parses an `rgb.txt` file. [Graphics::ColorObject](https://metacpan.org/pod/Graphics::ColorObject) can convert between RGB and other color space types. [Graphics::ColorUtils](https://metacpan.org/pod/Graphics::ColorUtils) can also convert betweeb RGB and other color space types, and supports RGB from names in various color schemes. [Acme::AutoColor](https://metacpan.org/pod/Acme::AutoColor) provides subroutines corresponding to color names. # SOURCE The development version is on github at [https://github.com/robrwo/Graphics-ColorNames](https://github.com/robrwo/Graphics-ColorNames) and may be cloned from [git://github.com/robrwo/Graphics-ColorNames.git](git://github.com/robrwo/Graphics-ColorNames.git) The SourceForge project for this module at [http://sourceforge.net/projects/colornames/](http://sourceforge.net/projects/colornames/) is no longer maintained. # BUGS Please report any bugs or feature requests on the bugtracker website [https://rt.cpan.org/Public/Dist/Display.html?Name=Graphics-ColorNames](https://rt.cpan.org/Public/Dist/Display.html?Name=Graphics-ColorNames) or by email to [bug-Graphics-ColorNames@rt.cpan.org](mailto:bug-Graphics-ColorNames@rt.cpan.org). When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. # AUTHOR Robert Rothenberg # CONTRIBUTORS - Alan D. Salewski - Steve Pomeroy - "chemboy" - Magnus Cedergren - Gary Vollink - Claus Färber - Andreas J. König - Slaven Rezić # COPYRIGHT AND LICENSE This software is Copyright (c) 2001-2019 by Robert Rothenberg. This is free software, licensed under: ``` The Artistic License 2.0 (GPL Compatible) ``` Graphics-ColorNames-v3.5.0/META.yml0000644000175000017500000000273513476273563014635 0ustar rrrr--- abstract: 'defines RGB values for common color names' author: - 'Robert Rothenberg ' build_requires: File::Spec: '0' FileHandle: '0' IO::File: '0' Module::Metadata: '0' Test::Exception: '0' Test::More: '0' Test::Most: '0' constant: '0' lib: '0' perl: v5.10.0 configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' keywords: - color license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Graphics-ColorNames provides: Graphics::ColorNames: file: lib/Graphics/ColorNames.pm version: v3.5.0 Graphics::ColorNames::X: file: lib/Graphics/ColorNames/X.pm version: v3.5.0 requires: Exporter: '5.57' Module::Load: '0.10' Module::Loaded: '0' perl: v5.10.0 version: '0' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Graphics-ColorNames repository: git://github.com/robrwo/Graphics-ColorNames.git version: v3.5.0 x_authority: cpan:RRWO x_contributors: - 'Alan D. Salewski ' - 'Steve Pomeroy ' - '"chemboy" ' - 'Magnus Cedergren ' - 'Gary Vollink ' - 'Claus Färber ' - 'Andreas J. König ' - 'Slaven Rezić ' x_generated_by_perl: v5.28.1 x_serialization_backend: 'YAML::Tiny version 1.73' Graphics-ColorNames-v3.5.0/Makefile.PL0000644000175000017500000000305113476273563015326 0ustar rrrr# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; use 5.010000; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "defines RGB values for common color names", "AUTHOR" => "Robert Rothenberg ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Graphics-ColorNames", "LICENSE" => "artistic_2", "MIN_PERL_VERSION" => "5.010000", "NAME" => "Graphics::ColorNames", "PREREQ_PM" => { "Exporter" => "5.57", "Module::Load" => "0.10", "Module::Loaded" => 0, "version" => 0 }, "TEST_REQUIRES" => { "File::Spec" => 0, "FileHandle" => 0, "IO::File" => 0, "Module::Metadata" => 0, "Test::Exception" => 0, "Test::More" => 0, "Test::Most" => 0, "constant" => 0, "lib" => 0 }, "VERSION" => "v3.5.0", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Exporter" => "5.57", "File::Spec" => 0, "FileHandle" => 0, "IO::File" => 0, "Module::Load" => "0.10", "Module::Loaded" => 0, "Module::Metadata" => 0, "Test::Exception" => 0, "Test::More" => 0, "Test::Most" => 0, "constant" => 0, "lib" => 0, "version" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Graphics-ColorNames-v3.5.0/LICENSE0000644000175000017500000002153313476273563014366 0ustar rrrrThis software is Copyright (c) 2001-2019 by Robert Rothenberg. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.