Skip to content

Latest commit

 

History

History
259 lines (143 loc) · 6.39 KB

Color.pod

File metadata and controls

259 lines (143 loc) · 6.39 KB

NAME

Random::Color returns a random color.

VERSION

This document describes Random::Color version 1.000.

SYNOPSIS

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 options

DESCRIPTION

Random::Color returns a random color from a list of colors.

random_color

Options

nothing, all, or undef

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.

additive

random_color('additive');

The additive option returns red, yellow, green, cyan, blue, or magenta.

additive primary

random_color('additive primary');

The additive primary option returns red, green, or blue.

additive secondary

random_color('additive secondary');

The additive secondary option returns yellow, cyan, or magenta.

additive plus

random_color('additive plus');

The additive plus option returns red, yellow, green, cyan, blue, magenta, or gray.

subtractive

random_color('subtractive');

The subtractive option returns red, orange, yellow, green, blue, or violet.

subtractive primary

random_color('subtractive primary');

The subtractive primary option returns red, yellow, or blue.

subtractive secondary

random_color('subtractive secondary');

The subtractive secondary option returns orange, green, or violet.

subtractive plus

random_color('subtractive plus');

The subtractive plus option returns red, orange, yellow, green, blue, violet, or gray.

pure

random_color('pure');

The pure option returns white, black, red, yellow, green, or blue.

gray

random_color('gray');

The gray option returns white, gray, and black.

eye

random_color('eye');

The eye option returns amber, black, blue, brown, gray, green, hazel, red, or violet.

hair

random_color('hair');

The hair option returns auburn, brown, black, blonde, red, gray, or white.

star

random_color('star');

The star option returns blue, red, orange, yellow, or white.

rainbow

random_color('rainbow');

The rainbow option returns red, orange, yellow, green, blue, indigo, or violet.

spectral

random_color('spectral');

The spectral option returns infrared, red, orange, yellow, green, blue, violet, or ultraviolet.

flower

random_color('flower');

The flower option returns amaranth, cornflower, fern, heliotrope, laventer, lilac, orchid, rose, or violet.

fruit

random_color('fruit');

The fruit option returns apricot, lemon, lime, olive, peach, pear, plum, pumpkin, raspberry, tangerine, or tomato.

metallic

random_color('metallic');

The metallic option returns brass, bronze, cobalt, copper, gold, platinum, silver, steel, or tin.

organic material

random_color('organic material');

The organic material option returns amber, coral, ivory, or seashell.

karate belts

random_color('karate belts');

The karate belts option returns white, orange, yellow, gold, green, blue, red, purple, brown, or black.

Crayola crayons

random_color('Crayola crayons');

The Crayola crayons option returns a random Crayola crayon color. The list of colors is too long to include here.

M&Ms

random_color('M&Ms');

The M&Ms option returns a random M&M color. The list of colors is too long to list here.

Olympic rings

random_color('Olympic rings');

The Olympic rings option returns blue, yellow, black, green, or red.

Pern dragon

random_color('Pern dragon');

The Pern dragon option returns blue, green, brown, bronze, or gold.

by keys

random_color('by keys');

The by keys option returns a random key listed above.

keys

random_color('keys');

The keys option will list all of the available keys in an array reference.

data

random_color('data');

The data option will return the data used in a hash reference.

help or options

random_color('help');
random_color('options');

The help or options options will return a list of all of your options.

Adding items to a list

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);

DEPENDENCIES

Random::Color depends on Fancy::Rand, Fancy::Open, File::ShareDir, and Exporter.

SEE ALSO

More random colors can be found in Random::GemMetalJewelry, Random::Color::Hex, Random::Color::VisiBone, and Random::Color::Web.

NOTE

I am always looking for more lists of colors to add, so please send your lists of colors.

AUTHOR

Lady Aleena

LICENSE AND COPYRIGHT

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.