33#include <NDEVR/Angle.h>
34#include <NDEVR/Vector.h>
35#include <NDEVR/Buffer.h>
167 template<
class t_type>
176 template<
class t_type>
237 NDEVR_BASE_API
static HSBColor ConvertColor(
const LABColor& current_color,
const PrimitiveAlignedBuffer<std::pair<LABColor, LABColor>, 32>& pairs,
bool preserve_brightness,
bool preserve_alpha);
A color identified by an AutoCAD Color Index (ACI) number from 1 through 255.
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
A color defined by hue, saturation, and brightness components.
static HSBColor ConvertColor(const LABColor ¤t_color, const PrimitiveAlignedBuffer< std::pair< LABColor, LABColor >, 32 > &pairs, bool preserve_brightness, bool preserve_alpha)
Converts a LABColor to an HSBColor using a set of LAB color mapping pairs.
uint01 saturation
The saturation component, ranging from 0 to 255.
bool operator!=(const HSBColor &color) const
Checks inequality between two HSBColor instances.
HSBColor()
Default constructor.
HSBColor(const ACIColor &)
Constructs an HSBColor by converting from an ACIColor.
void setHDeg(const t_type &val)
Sets the hue component from a value in degrees.
fltp04 getBF() const
Gets the brightness as a normalized float (0.0-1.0).
HSBColor(const XYZColor &)
Constructs an HSBColor by converting from an XYZColor.
fltp04 getBS() const
Gets the saturation as a normalized float (0.0-1.0).
Angle< HSBAngleType > hue
The hue component as an angle, ranging from 0 to 360 degrees.
HSBColor(const Vector< 4, fltp04 > &color)
Constructs an HSBColor from a 4-component floating-point vector.
constexpr HSBColor(fltp04 h, fltp04 s, fltp04 b, fltp04 a=1.0f)
Constructs an HSBColor from raw single-precision values with hue in degrees.
constexpr HSBColor(const Angle< HSBAngleType > &h, fltp08 s, fltp08 b, fltp08 a=1.0)
Constructs an HSBColor from double-precision floating-point values.
uint01 brightness
The brightness component, ranging from 0 to 255.
constexpr HSBColor(const Angle< HSBAngleType > &h, uint01 s, uint01 b, uint01 a=255)
Constructs an HSBColor from integer component values.
constexpr HSBColor(fltp08 h, fltp08 s, fltp08 b, fltp08 a=1.0f)
Constructs an HSBColor from raw double-precision values with hue in degrees.
fltp04 getAF() const
Gets the alpha as a normalized float (0.0-1.0).
uint01 alpha
The alpha (opacity) component, ranging from 0 (transparent) to 255 (opaque).
constexpr HSBColor(const Angle< HSBAngleType > &h, fltp04 s, fltp04 b, fltp04 a=1.0f)
Constructs an HSBColor from single-precision floating-point values.
HSBColor(const RGBColor &)
Constructs an HSBColor by converting from an RGBColor.
t_type getHDeg() const
Gets the hue component in degrees, cast to the requested type.
bool operator==(const HSBColor &color) const
Checks equality between two HSBColor instances.
Forward declaration of the NDEVR translated string class.
Represents a color in the RGB space with optional alpha transparency.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Forward declaration of HSLColor.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
double fltp08
Defines an alias representing an 8 byte floating-point number.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
@ DEGREES
Angle measured in degrees (0 to 360 for a full circle).
sint04 HSBAngleType
Integer type used for storing HSB hue angle values.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
int8_t sint01
-Defines an alias representing a 1 byte, signed integer.
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...