66 std::string rgbaToString(T r, T g, T b, T a)
68 return rgbaIntsToString(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b),
static_cast<int>(a));
72 std::string bgraToString(T b, T g, T r, T a)
74 return bgraIntsToString(
static_cast<int>(b),
static_cast<int>(g),
static_cast<int>(r),
static_cast<int>(a));
78 std::string rgbToString(T r, T g, T b)
80 return rgbIntsToString(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
84 std::string bgrToString(T b, T g, T r)
86 return bgrIntsToString(
static_cast<int>(b),
static_cast<int>(g),
static_cast<int>(r));
135 return Detail::rgbaToString(
r,
g,
b,
a);
233 return Detail::bgraToString(
b,
g,
r,
a);
325 return Detail::rgbToString(
r,
g,
b);
401 return Detail::bgrToString(
b,
g,
r);
#define ZIVID_UTILS_EXPORT
Definition UtilsExport.h:56
Definition EnvironmentInfo.h:74
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:85
ColorSRGB ColorRGBA_SRGB
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
Definition Color.h:93
std::ostream & operator<<(std::ostream &stream, const Array1D< T > &array)
Serialize array information to a stream.
Definition Array1D.h:183
ColorBGRABase(T blue, T green, T red, T alpha)
Constructor.
Definition Color.h:205
ZIVID_UTILS_EXPORT bool operator!=(const ColorBGRABase &rhs) const
Check for inequality.
T g
Green channel.
Definition Color.h:216
ColorBGRABase()=default
Constructor.
T a
Alpha channel.
Definition Color.h:222
T ValueType
The type of the channel values.
Definition Color.h:199
T r
Red channel.
Definition Color.h:219
ZIVID_UTILS_EXPORT bool operator==(const ColorBGRABase &rhs) const
Check for equality.
T b
Blue channel.
Definition Color.h:213
std::string toString() const
Get string representation.
Definition Color.h:231
Color with 8-bit blue, green, red and alpha channels in the sRGB color space.
Definition Color.h:273
ColorBGRABase()=default
Constructor.
Color with 8-bit blue, green, red and alpha channels.
Definition Color.h:255
ColorBGRABase()=default
Constructor.
T b
Blue channel.
Definition Color.h:384
std::string toString() const
Get string representation.
Definition Color.h:399
ColorBGRBase(T blue, T green, T red)
Constructor.
Definition Color.h:377
ZIVID_UTILS_EXPORT bool operator==(const ColorBGRBase &rhs) const
Check for equality.
ColorBGRBase()=default
Constructor.
T g
Green channel.
Definition Color.h:387
T ValueType
The type of the channel values.
Definition Color.h:371
ZIVID_UTILS_EXPORT bool operator!=(const ColorBGRBase &rhs) const
Check for inequality.
T r
Red channel.
Definition Color.h:390
Color with 8-bit blue, green and red channels (no alpha) in the sRGB color space.
Definition Color.h:437
ColorBGRBase()=default
Constructor.
Color with 8-bit blue, green and red channels (no alpha)
Definition Color.h:422
ColorBGRBase()=default
Constructor.
ZIVID_UTILS_EXPORT bool operator!=(const ColorRGBABase &rhs) const
Check for inequality.
T ValueType
The type of the channel values.
Definition Color.h:101
std::string toString() const
Get string representation.
Definition Color.h:133
T g
Green channel.
Definition Color.h:118
ZIVID_UTILS_EXPORT bool operator==(const ColorRGBABase &rhs) const
Check for equality.
ColorRGBABase()=default
Constructor.
T a
Alpha channel.
Definition Color.h:124
T r
Red channel.
Definition Color.h:115
T b
Blue channel.
Definition Color.h:121
ColorRGBABase(T red, T green, T blue, T alpha)
Constructor.
Definition Color.h:107
Color with 8-bit red, green, blue and alpha channels.
Definition Color.h:189
ColorRGBABase()=default
Constructor.
Color with 32-bit red, green, blue and alpha channels.
Definition Color.h:285
ColorRGBABase()=default
Constructor.
T r
Red channel.
Definition Color.h:308
T g
Green channel.
Definition Color.h:311
std::string toString() const
Get string representation.
Definition Color.h:323
ZIVID_UTILS_EXPORT bool operator!=(const ColorRGBBase &rhs) const
Check for inequality.
ColorRGBBase()=default
Constructor.
ColorRGBBase(T red, T green, T blue)
Constructor.
Definition Color.h:301
T ValueType
The type of the channel values.
Definition Color.h:295
ZIVID_UTILS_EXPORT bool operator==(const ColorRGBBase &rhs) const
Check for equality.
T b
Blue channel.
Definition Color.h:314
Color with 8-bit red, green and blue channels (no alpha) in the sRGB color space.
Definition Color.h:361
ColorRGBBase()=default
Constructor.
Color with 8-bit red, green and blue channels (no alpha)
Definition Color.h:346
ColorRGBBase()=default
Constructor.
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
Definition Color.h:160
ColorRGBABase()=default
Constructor.