Faker v0.12.0 Faker.Color View Source
Functions for generating different color representations.
Link to this section Summary
Functions
Return a random fancy color name
Return a random color name
Return random RGB decimal value.
Return random RGB hex value.
Link to this section Functions
Link to this function
fancy_name()
View Source
fancy_name()
View Source
fancy_name() :: String.t()
fancy_name() :: String.t()
Return a random fancy color name
Examples
iex> Faker.Color.fancy_name()
"Tawny"
iex> Faker.Color.fancy_name()
"Citrine"
iex> Faker.Color.fancy_name()
"Greige"
iex> Faker.Color.fancy_name()
"Cesious"
Link to this function
name()
View Source
name()
View Source
name() :: String.t()
name() :: String.t()
Return a random color name
Examples
iex> Faker.Color.name()
"Red"
iex> Faker.Color.name()
"Green"
iex> Faker.Color.name()
"Brown"
iex> Faker.Color.name()
"Pink"
Link to this function
rgb_decimal() View Source
Return random RGB decimal value.
Examples
iex> Faker.Color.rgb_decimal()
{214, 217, 139}
iex> Faker.Color.rgb_decimal()
{136, 200, 102}
iex> Faker.Color.rgb_decimal()
{244, 150, 219}
iex> Faker.Color.rgb_decimal()
{212, 222, 123}
Link to this function
rgb_hex()
View Source
rgb_hex()
View Source
rgb_hex() :: binary()
rgb_hex() :: binary()
Return random RGB hex value.
Examples
iex> Faker.Color.rgb_hex()
"D6D98B"
iex> Faker.Color.rgb_hex()
"88C866"
iex> Faker.Color.rgb_hex()
"F496DB"
iex> Faker.Color.rgb_hex()
"D4DE7B"