10#define AVARA3D_COLOR_H
126 explicit Color(
const std::string& hexString);
Represents a normalized RGBA color.
math::vec4 rgba() const
Returns the floating-point RGBA components.
static Color Olive()
Returns opaque olive.
Color()
Creates opaque white.
static Color Magenta()
Returns opaque magenta.
float r() const
Returns the floating-point red component.
Color(const math::vec3 &rgb)
Creates an opaque color from floating-point RGB components.
static Color Black()
Returns opaque black.
Color(float r, float g, float b)
Creates an opaque color from floating-point RGB components.
Color(float r, float g, float b, float a)
Creates a color from floating-point RGBA components.
Color(uint32_t color)
Creates a color from a packed 0xRRGGBBAA value.
static Color Brown()
Returns opaque brown.
Color(const math::u8vec4 &irgba)
Creates a color from 8-bit RGBA components.
static Color Lime()
Returns opaque lime.
uint8_t u8a() const
Returns the alpha component converted to 8-bit form.
Color(const std::string &hexString)
Creates a color from hexadecimal RGB or RGBA text.
uint8_t u8r() const
Returns the red component converted to 8-bit form.
float a() const
Returns the floating-point alpha component.
static Color Orange()
Returns opaque orange.
Color(float white)
Creates an opaque grayscale color with all RGB components set to white.
static Color Maroon()
Returns opaque maroon.
static Color Teal()
Returns opaque teal.
static Color Navy()
Returns opaque navy.
math::u8vec3 u8rgb() const
Returns the RGB components converted to 8-bit form.
static Color Random()
Returns an opaque color with independently randomized 8-bit RGB channels.
math::u8vec4 u8rgba() const
Returns the RGBA components converted to 8-bit form.
static Color Purple()
Returns opaque purple.
float g() const
Returns the floating-point green component.
static Color Red()
Returns opaque red.
static Color DarkGray()
Returns opaque dark gray.
float b() const
Returns the floating-point blue component.
Color(const math::u8vec3 &irgb)
Creates an opaque color from 8-bit RGB components.
static Color LightGray()
Returns opaque light gray.
math::vec3 rgb() const
Returns the floating-point RGB components.
static Color Blue()
Returns opaque blue.
uint8_t u8b() const
Returns the blue component converted to 8-bit form.
static Color Yellow()
Returns opaque yellow.
static Color Gray()
Returns opaque gray.
static Color Cyan()
Returns opaque cyan.
static Color Green()
Returns opaque green.
static Color White()
Returns opaque white.
Color(const math::vec4 &rgba)
Creates a color from floating-point RGBA components.
uint8_t u8g() const
Returns the green component converted to 8-bit form.