Skip to main content

ImageColor

The ImageColor struct represents a color value with multiple formats, including integer, unsigned integer, half-precision, and full-precision floating point. It supports flexibility in initialization, allowing the color to be specified as individual components or as a single value for all components. The struct provides multiple constructors for different data types, including support for copying, as well as conversion between different color formats.

#include <format/TellusimImage.h>

Constructors

ImageColor()
ImageColor(const ImageColor &c)
explicit ImageColor(int32_t i)
explicit ImageColor(uint32_t u)
explicit ImageColor(float16_t h)
explicit ImageColor(float32_t f)
ImageColor(int32_t l, int32_t a)
ImageColor(uint32_t l, uint32_t a)
ImageColor(float16_t l, float16_t a)
ImageColor(float32_t l, float32_t a)
ImageColor(int32_t r, int32_t g, int32_t b, int32_t a)
ImageColor(uint32_t r, uint32_t g, uint32_t b, uint32_t a)
ImageColor(float16_t r, float16_t g, float16_t b, float16_t a)
ImageColor(float32_t r, float32_t g, float32_t b, float32_t a)
ImageColor(const Color &color, Format format)

Methods

Color value.

void set(const Color &color, Format format)
Color get(Format format) const

Assignment operator.

ImageColor &operator=(const ImageColor &c)

Enums

NameValue
Size4