64 std::string rgbaToString(T r, T g, T b, T a)
66 return rgbaIntsToString(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b),
static_cast<int>(a));
70 std::string bgraToString(T b, T g, T r, T a)
72 return bgraIntsToString(
static_cast<int>(b),
static_cast<int>(g),
static_cast<int>(r),
static_cast<int>(a));
117 return Detail::rgbaToString(
r,
g,
b,
a);
201 return Detail::bgraToString(
b,
g,
r,
a);
#define ZIVID_UTILS_EXPORT
Definition UtilsExport.h:56
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:84
std::ostream & operator<<(std::ostream &stream, const Array2D< T > &array)
Serialize array information to a stream.
Definition Array2D.h:283
ColorBGRABase(T blue, T green, T red, T alpha)
Constructor.
Definition Color.h:173
ZIVID_UTILS_EXPORT bool operator!=(const ColorBGRABase &rhs) const
Check for inequality.
T g
Green channel.
Definition Color.h:184
ColorBGRABase()=default
Constructor.
T a
Alpha channel.
Definition Color.h:190
T ValueType
The type of the channel values.
Definition Color.h:167
T r
Red channel.
Definition Color.h:187
ZIVID_UTILS_EXPORT bool operator==(const ColorBGRABase &rhs) const
Check for equality.
T b
Blue channel.
Definition Color.h:181
std::string toString() const
Get string representation.
Definition Color.h:199
Color with 8-bit blue, green, red and alpha channels.
Definition Color.h:223
ZIVID_UTILS_EXPORT bool operator!=(const ColorRGBABase &rhs) const
Check for inequality.
T ValueType
The type of the channel values.
Definition Color.h:83
std::string toString() const
Get string representation.
Definition Color.h:115
T g
Green channel.
Definition Color.h:100
ZIVID_UTILS_EXPORT bool operator==(const ColorRGBABase &rhs) const
Check for equality.
ColorRGBABase()=default
Constructor.
T a
Alpha channel.
Definition Color.h:106
T r
Red channel.
Definition Color.h:97
T b
Blue channel.
Definition Color.h:103
ColorRGBABase(T red, T green, T blue, T alpha)
Constructor.
Definition Color.h:89
Color with 8-bit red, green, blue and alpha channels.
Definition Color.h:157
Color with 8-bit red, green, blue and alpha channels in the sRGB color space.
Definition Color.h:140