NAME

Faker::Provider::Color - Faker Standard Color Provider

VERSION

version 0.12

SYNOPSIS

    use Faker;
    use Faker::Provider::Color;

    my $faker = Faker->new;
    my $color = Faker::Provider::Color->new(factory => $faker);

    say $color->name;

DESCRIPTION

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.

METHODS

hex_code

    $color->hex_code;

    # #1d648c
    # #9f6ad3
    # #60a5ad

The hex_code method generates a random ficticious hex color.

name

    $color->name;

    # IndianRed
    # Chartreuse
    # Navy

The name method generates a random ficticious color name.

rgbcolors

    $color->rgbcolors;

    # 107,172,5
    # 237,189,50
    # 44,239,160

The rgbcolors method generates a random ficticious rgb colors.

rgbcolors_array

    $color->rgbcolors_array;

    # [ 107,172,56 ]
    # [ 237,189,50 ]
    # [ 44,239,160 ]

The rgbcolors_array method generates a random ficticious rgb colors.

rgbcolors_css

    $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.

safe_hex_code

    $color->safe_hex_code;

    # #ff009e
    # #ff0004
    # #ff0072

The safe_hex_code method generates a random ficticious safe hex color.

safe_name

    $color->safe_name;

    # navy
    # fuchsia
    # aqua

The safe_name method generates a random ficticious safe color name.

AUTHOR

Al Newkirk <anewkirk@ana.io>

COPYRIGHT AND LICENSE

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.