Faker C++
|
Functions | |
FAKER_CXX_EXPORT std::string_view | name (Locale locale=Locale::en_US) |
Returns a random color. | |
FAKER_CXX_EXPORT std::string | rgb (bool includeAlpha=false) |
Returns an RGB color. | |
FAKER_CXX_EXPORT std::string | hex (HexCasing casing=HexCasing::Lower, HexPrefix prefix=HexPrefix::Hash, bool includeAlpha=false) |
Returns a hex color. | |
FAKER_CXX_EXPORT std::string | hsl (bool includeAlpha=false) |
Returns an HSL color. | |
FAKER_CXX_EXPORT std::string | lch (bool includeAlpha=false) |
Returns an LCH color. | |
FAKER_CXX_EXPORT std::string | cmyk () |
Return a CMYK color. | |
FAKER_CXX_EXPORT std::string | lab () |
Return a LAB color. | |
FAKER_CXX_EXPORT std::string | hsb () |
Return a HSB color. | |
FAKER_CXX_EXPORT std::string | hsv () |
Return a HSV color. | |
FAKER_CXX_EXPORT std::string | hwb () |
Return a HWB color. | |
FAKER_CXX_EXPORT std::string | yuv () |
Return a YUV color. | |
FAKER_CXX_EXPORT std::string | space () |
Returns a random color space. | |
FAKER_CXX_EXPORT std::string faker::color::cmyk | ( | ) |
Return a CMYK color.
FAKER_CXX_EXPORT std::string faker::color::hex | ( | HexCasing | casing = HexCasing::Lower, |
HexPrefix | prefix = HexPrefix::Hash, | ||
bool | includeAlpha = false ) |
Returns a hex color.
casing | Casing of the generated string. Defaults to `HexCasing::Lower`. |
prefix | Prefix for the generated string. Defaults to `HexPrefix::ZeroX`. |
includeAlpha | Adds an alpha value to the color. Defaults to `false`. |
FAKER_CXX_EXPORT std::string faker::color::hsb | ( | ) |
Return a HSB color.
FAKER_CXX_EXPORT std::string faker::color::hsl | ( | bool | includeAlpha = false | ) |
Returns an HSL color.
includeAlpha | Adds an alpha value to the color (HSLA). Defaults to `false`. |
FAKER_CXX_EXPORT std::string faker::color::hsv | ( | ) |
Return a HSV color.
FAKER_CXX_EXPORT std::string faker::color::hwb | ( | ) |
Return a HWB color.
FAKER_CXX_EXPORT std::string faker::color::lab | ( | ) |
Return a LAB color.
FAKER_CXX_EXPORT std::string faker::color::lch | ( | bool | includeAlpha = false | ) |
Returns an LCH color.
includeAlpha | Adds an alpha value to the color (LCHA). Defaults to `false`. |
FAKER_CXX_EXPORT std::string_view faker::color::name | ( | Locale | locale = Locale::en_US | ) |
Returns a random color.
locale | The locale. Defaults to `Locale::en_US`. |
FAKER_CXX_EXPORT std::string faker::color::rgb | ( | bool | includeAlpha = false | ) |
Returns an RGB color.
includeAlpha | Adds an alpha value to the color (RGBA). Defaults to `false`. |
FAKER_CXX_EXPORT std::string faker::color::space | ( | ) |
Returns a random color space.
FAKER_CXX_EXPORT std::string faker::color::yuv | ( | ) |
Return a YUV color.