33#include <NDEVR/Vector.h>
34#include <NDEVR/ObjectInfo.h>
43 class TranslatedString;
44 static const fltp04 inverse_255 = 1.0f/255.0f;
97 template<
class t_type>
101 template<
class t_type>
105 template<
class t_type>
109 template<
class t_type>
136 return m_values[channel] * inverse_255;
170 for(
uint04 dim = 0; dim < 4; ++dim)
200 static const bool Primitive =
true;
203 static const bool Unsigned =
false;
204 static const bool Float =
false;
205 static const bool Integer =
false;
206 static const bool Number =
false;
207 static const bool Enum =
false;
211 static const bool Boolean =
false;
214 static_assert(
sizeof(RGBColor) == 4,
"Bad Color size");
220 template<
class t_type>
225 for (
uint01 dim = 0; dim < 3; ++dim)
234 for (
uint01 dim = 0; dim < 3; ++dim)
244 for (
uint01 dim = 0; dim < 3; ++dim)
ACI colors are the standard colors used in AutoCAD-based products. Each color is identified by an ACI...
Definition ACIColor.h:58
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Pointer.hpp:62
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
RGBColor(const Vector< 4, t_type > &color)
Definition RGBColor.h:110
static NDEVR_BASE_API RGBColor create24BitColor(uint04 color_24)
Definition RGBColor.cpp:98
NDEVR_BASE_API String getHexRGBA() const
Definition RGBColor.cpp:291
NDEVR_BASE_API fltp04 luminance() const
Returns the luminance of the color.
Definition RGBColor.cpp:124
fltp04 getF(uint01 channel) const
Definition RGBColor.h:134
NDEVR_BASE_API String getHexRGB() const
Definition RGBColor.cpp:305
NDEVR_BASE_API uint04 convertToRGBA32BitColor() const
Definition RGBColor.cpp:57
RGBColor(const Vector< 3, t_type > &color)
Definition RGBColor.h:106
NDEVR_BASE_API TranslatedString getName() const
Definition RGBColor.cpp:282
static NDEVR_BASE_API RGBColor Average(const RGBColor &a, const RGBColor &b, fltp04 percent=0.5f)
Definition RGBColor.cpp:159
NDEVR_BASE_API uint04 convertToABGR32BitColor() const
Definition RGBColor.cpp:66
constexpr RGBColor(const RGBColor &color)
Definition RGBColor.h:93
RGBColor(uint04 value)
Definition RGBColor.h:64
size_t operator()() const
Definition RGBColor.h:164
constexpr RGBColor()
Definition RGBColor.h:61
static NDEVR_BASE_API RGBColor AverageLAB(const RGBColor &a, const RGBColor &b, fltp04 percent=0.5f)
Definition RGBColor.cpp:173
NDEVR_BASE_API Vector< 3, fltp04 > get3F() const
Definition RGBColor.cpp:151
static const uint01 a_pos
Definition RGBColor.h:58
NDEVR_BASE_API Vector< 4, fltp04 > get4F() const
Definition RGBColor.cpp:155
void setF(uint01 channel, fltp04 value)
Definition RGBColor.h:138
static NDEVR_BASE_API RGBColor CreateRGBA32BitColor(uint04 color_32)
Definition RGBColor.cpp:75
static const uint01 r_pos
Definition RGBColor.h:55
constexpr RGBColor & operator=(const RGBColor &color)
Definition RGBColor.h:168
static const uint01 g_pos
Definition RGBColor.h:56
NDEVR_BASE_API String getHexARGB() const
Definition RGBColor.cpp:298
RGBColor(const Vector< 1, t_type > &color)
Definition RGBColor.h:98
constexpr RGBColor(const uint01 r, const uint01 g, const uint01 b, const uint01 a=255)
Constructor to initialize color using integer values for each channel.
Definition RGBColor.h:81
constexpr RGBColor(const sint04 r, const sint04 g, const sint04 b, const sint04 a=255)
Definition RGBColor.h:67
NDEVR_BASE_API uint04 convertTo24BitColor() const
Definition RGBColor.cpp:93
RGBColor(const Vector< 2, t_type > &color)
Definition RGBColor.h:102
static const uint01 b_pos
Definition RGBColor.h:57
NDEVR_BASE_API bool isLight() const
Definition RGBColor.cpp:130
NDEVR_BASE_API RGBColor contrastingColor() const
Definition RGBColor.cpp:134
RGBColor opaque() const
Definition RGBColor.h:129
static NDEVR_BASE_API RGBColor CreateARGB32BitColor(uint04 color_32)
Definition RGBColor.cpp:84
Definition TranslatedString.h:9
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
uint01 m_values[t_dims]
Definition Vector.hpp:675
constexpr Vector< t_dims, t_new_type > as() const
Definition Vector.hpp:324
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:76
constexpr std::enable_if< IsVecType< t_vector_type, Angle< fltp08 > >::value, t_vector_type >::type operator*(const t_vector_type &angle, const t_type &mult)
Definition AngleFunctions.h:403
constexpr t_type clip(const t_type &value, const t_type &lower_bound, const t_type &upper_bound)
Clips the value given so that that the returned value falls between upper and lower bound.
Definition BaseFunctions.hpp:240
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
constexpr RGBColor & operator*=(RGBColor &color, const t_type &value)
Definition RGBColor.h:221
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
constexpr bool isNaN(const t_type &value)
Query if 'value' is valid or invalid.
Definition BaseFunctions.hpp:200
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition BaseValues.hpp:272
static constexpr ObjectInfo< uint01, false > VectorSub()
Definition RGBColor.h:212
Information about the object.
Definition ObjectInfo.h:56