Random::Color returns a random color.
This document describes Random::Color version 1.000.
my $additive = random_color('additive');
my $additive_primary = random_color('additive primary');
my $additive_secondary = random_color('additive secondary');
my $additive_plus = random_color('additive plus');
my $subtractive = random_color('subtractive');
my $subtractive_primary = random_color('subtractive primary');
my $subtractive_secondary = random_color('subtractive secondary');
my $subtractive_plus = random_color('subtractive plus');
my $pure_color = random_color('pure');
my $gray = random_color('gray');
my $eye_color = random_color('eye');
my $hair_color = random_color('hair');
my $star_color = random_color('star');
my $rainbow_color = random_color('rainbow');
my $spectral_color = random_color('spectral');
my $flower_color = random_color('flower');
my $fruit_color = random_color('fruit');
my $metallic_color = random_color('metallic');
my $organic_mineral_color = random_color('organic mineral');
my $karate_belt_color = random_color('karate belts');
my $Crayola_crayon_color = random_color('Crayola crayons');
my $MandM_color = random_color('M&Ms');
my $Olympic_ring_color = random_color('Olympic rings');
my $Pern_dragon_color = random_color('Pern dragon');
print random_color('help'); # get random_color optionsRandom::Color returns a random color from a list of colors.
random_color;
random_color();
random_color('all');
random_color(undef);These options will return any value in any list. You can read the options below to see all of the potential values.
random_color('additive');The additive option returns red, yellow, green, cyan, blue, or magenta.
random_color('additive primary');The additive primary option returns red, green, or blue.
random_color('additive secondary');The additive secondary option returns yellow, cyan, or magenta.
random_color('additive plus');The additive plus option returns red, yellow, green, cyan, blue, magenta, or gray.
random_color('subtractive');The subtractive option returns red, orange, yellow, green, blue, or violet.
random_color('subtractive primary');The subtractive primary option returns red, yellow, or blue.
random_color('subtractive secondary');The subtractive secondary option returns orange, green, or violet.
random_color('subtractive plus');The subtractive plus option returns red, orange, yellow, green, blue, violet, or gray.
random_color('pure');The pure option returns white, black, red, yellow, green, or blue.
random_color('gray');The gray option returns white, gray, and black.
random_color('eye');The eye option returns amber, black, blue, brown, gray, green, hazel, red, or violet.
random_color('hair');The hair option returns auburn, brown, black, blonde, red, gray, or white.
random_color('star');The star option returns blue, red, orange, yellow, or white.
random_color('rainbow');The rainbow option returns red, orange, yellow, green, blue, indigo, or violet.
random_color('spectral');The spectral option returns infrared, red, orange, yellow, green, blue, violet, or ultraviolet.
random_color('flower');The flower option returns amaranth, cornflower, fern, heliotrope, laventer, lilac, orchid, rose, or violet.
random_color('fruit');The fruit option returns apricot, lemon, lime, olive, peach, pear, plum, pumpkin, raspberry, tangerine, or tomato.
random_color('metallic');The metallic option returns brass, bronze, cobalt, copper, gold, platinum, silver, steel, or tin.
random_color('organic material');The organic material option returns amber, coral, ivory, or seashell.
random_color('karate belts');The karate belts option returns white, orange, yellow, gold, green, blue, red, purple, brown, or black.
random_color('Crayola crayons');The Crayola crayons option returns a random Crayola crayon color. The list of colors is too long to include here.
random_color('M&Ms');The M&Ms option returns a random M&M color. The list of colors is too long to list here.
random_color('Olympic rings');The Olympic rings option returns blue, yellow, black, green, or red.
random_color('Pern dragon');The Pern dragon option returns blue, green, brown, bronze, or gold.
random_color('by keys');The by keys option returns a random key listed above.
random_color('keys');The keys option will list all of the available keys in an array reference.
random_color('data');The data option will return the data used in a hash reference.
random_color('help');
random_color('options');The help or options options will return a list of all of your options.
You can add items to the list by adding an array reference with the additional items as the second parameter.
my @additions = ('color 1', 'color 2');
random_color('<your option>', \@additions);Random::Color depends on Fancy::Rand, Fancy::Open, File::ShareDir, and Exporter.
More random colors can be found in Random::GemMetalJewelry, Random::Color::Hex, Random::Color::VisiBone, and Random::Color::Web.
I am always looking for more lists of colors to add, so please send your lists of colors.
Lady Aleena
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
Copyright © 2020, Lady Aleena (aleena@cpan.org). All rights reserved.