Faker::Provider::Color - Faker Standard Color Provider
version 0.12
use Faker; use Faker::Provider::Color; my $faker = Faker->new; my $color = Faker::Provider::Color->new(factory => $faker); say $color->name;
Faker::Provider::Color is a Faker provider which provides fake color data. Note: This is an early release available for testing and feedback and as such is subject to change.
$color->hex_code; # #1d648c # #9f6ad3 # #60a5ad
The hex_code method generates a random ficticious hex color.
$color->name; # IndianRed # Chartreuse # Navy
The name method generates a random ficticious color name.
$color->rgbcolors; # 107,172,5 # 237,189,50 # 44,239,160
The rgbcolors method generates a random ficticious rgb colors.
$color->rgbcolors_array; # [ 107,172,56 ] # [ 237,189,50 ] # [ 44,239,160 ]
The rgbcolors_array method generates a random ficticious rgb colors.
$color->rgbcolors_css; # rgb(219,144,55) # rgb(171,64,67) # rgb(25,20,204)
The rgbcolors_css method generates a random ficticious rgbcolors for css.
$color->safe_hex_code; # #ff009e # #ff0004 # #ff0072
The safe_hex_code method generates a random ficticious safe hex color.
$color->safe_name; # navy # fuchsia # aqua
The safe_name method generates a random ficticious safe color name.
Al Newkirk <anewkirk@ana.io>
This software is copyright (c) 2014 by Al Newkirk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Faker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Faker
CPAN shell
perl -MCPAN -e shell install Faker
For more information on module installation, please visit the detailed CPAN module installation guide.