Extensions
Colors
Colors extension for Xefi Faker PHP
Please be aware that the base package only provide latin colors, if you want to have more specialized content please install a locale.
Color Name
$faker->colorName(); // Castaneus
Safe Color Name
$faker->safeColorName() // Castaneus
Safe Hex Color
$faker->safeHexColor() // #22aacc
Rgb Color As Array
$faker->rgbColorAsArray() // [160, 17, 93]
Rgb Color
$faker->rgbColor() // 116,148,249
Rgb Css Color
$faker->rgbCssColor() // rgb(181,121,179)
Rgba Color As Array
$faker->rgbaColorAsArray() // [49, 61, 231, 0.31]
Rgba Color
$faker->rgbaColor() // 235,46,241,0.52
Rgba Css Color
$faker->rgbaCssColor() // rgba(226,40,214,0.08)
Hsl Color As Array
$faker->hslColorAsArray() // [112, 89, 17]
Hsl Color
$faker->hslColor() // 242,28,24
Hsl Css Color
$faker->hslCssColor() // hsl(28,69,85)
Hsla Color As Array
$faker->hslaColorAsArray() // [273, 66, 17, 0.68]
Hsla Color
$faker->hslaColor() // 320,51,71,0.46
Hsla Css Color
$faker->hslaCssColor() // hsla(282,46,34,0.64)